hi, my problem/question is, can i have a child GUI that cannot be dragged out of its parent? or is there a setting for this? so far i have this code (images attached if you'd like: $MAINGUI = GUICreate("Coins", 600, 400)
$FILEMENU = GUICtrlCreateMenu("File")
$FILEMENUSECT1 = GUICtrlCreateMenuItem("Open player...", $FILEMENU)
$FILEMENUSECT2 = GUICtrlCreateMenuItem("Save player...", $FILEMENU)
$FILEMENUSECT3 = GUICtrlCreateMenuItem("Save", $FILEMENU)
GUICtrlCreateMenuItem("", $FILEMENU)
$FILEMENUSECT4 = GUICtrlCreateMenuItem("Exit", $FILEMENU)
GUICtrlCreatePic("backround.jpg", 0, 0, 600, 380)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW, $MAINGUI)
;
;
$DIMEWIN = GUICreate("", 40, 40, 20, 20, $WS_POPUP, BitOr($WS_EX_LAYERED, $WS_EX_MDICHILD), $MAINGUI)
$DIME = GUICtrlCreatePic("dime.gif", 0, 0, 40, 40)
GUISetState(@SW_SHOW, $DIMEWIN)
;GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;
;
;
While 1
$GET = GUIGetMsg()
If $GET = $GUI_EVENT_CLOSE Then Exit
If $GET = $FILEMENUSECT4 Then Exit
If $GET = $DIME Then Drag($DIMEWIN)
WEnd
;
;
;
Func Drag($WIN)
Do
$MOUSEPOS = MouseGetPos()
WinMove($WIN, "", $MOUSEPOS[0], $MOUSEPOS[1])
Until _IsPressed(01) = 0
EndFunc and when you Drag the dime, the child window can be dragged anywhere evn outside of the parent, i don't want this, i need a way to only allow it to be dragged inside the parent GUI any ideas ? thanks