Posted on 2010-01-20 16:41
lxasp 阅读(481)
评论(1) 编辑 收藏 引用
Procedure ForceGadgetZOrder(gadget)
;/ Flip the gadget draw order and force
;/ the topmost gadget to recieve focus
;/ first for overlapping gadgets
SetWindowLong_(GadgetID(gadget),#GWL_STYLE,GetWindowLong_(GadgetID(gadget),#GWL_STYLE)|#WS_CLIPSIBLINGS)
SetWindowPos_(GadgetID(gadget),#HWND_TOP,0,0,0,0,#SWP_NOSIZE|#SWP_NOMOVE)
EndProcedure
OpenWindow(0,640,480,120,100,"")
CreateGadgetList(WindowID(0))
ForceGadgetZOrder(ButtonGadget(#PB_Any,10,10,70,50,"Bottom"))
ForceGadgetZOrder(ButtonGadget(#PB_Any,40,40,70,50,"Top"))
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow