use mouse wheel for see the problem
-------------------
Layers={}
@DISPLAY 1, {X=150, Y=#CENTER, Width = 800, Height = 600, Title = "Layered display", Borderless=0}
ScreenWidth=GetAttribute(#DISPLAY,0,#ATTRWIDTH)
ScreenHeight=GetAttribute(#DISPLAY,0,#ATTRHEIGHT)
CreateBGPic(0,ScreenWidth,ScreenHeight,#GRAY)
DisplayBGPic(0)
EnableLayers()
Function p_Init(id,x,y,width,height,color)
;LoadBrush(0,name,{LoadAlpha=True})
CreateBrush(id,Width,Height,color)
DisplayBrush(id,X,Y)
SetLayerStyle(id,{width=width,height=height})
SetLayerBorder(id,True,#BLACK,1)
Selectlayer(1)
t=GetLayerStyle(1)
Box(20,20,t.width/2,t.height/2,#BLACK)
endselect
Layers[id]={}
Layers[id].PosX=x
Layers[id].PosY=y
EndFunction
Function p_Move(msg)
Switch msg.action
Case "OnWheelDown":
IF (t.width<3000)And(t.height<3000)
Layers[1].PosX=Layers[1].PosX-(t.width/2)
Layers[1].PosY=Layers[1].PosY-(t.height/2)
t.width=t.width*2
t.height=t.height*2
EndIF
Case "OnWheelUp":
IF (t.width>3)And(t.height>3)
Layers[1].PosX=Layers[1].PosX+(t.width/4)
Layers[1].PosY=Layers[1].PosY+(t.height/4)
t.width=t.width/2
t.height=t.height/2
EndIF
EndSwitch
SetLayerStyle(1,{X=Layers[1].PosX,Y=Layers[1].PosY,Width=t.width,Height=t.height})
EndFunction
p_Init(1,#CENTER,#CENTER,150,200,"$FFFFFF")
InstallEventHandler({OnWheelDown = P_Move, OnWheelUp = P_Move})
EscapeQuit(True)
/* Loops */
Repeat
WaitEvent
Forever