Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <WinApi.au3> ;need for _WinAPI_SetParent
- Local $gui = GUICreate("2 button gui with bk image", 400, 400)
- ; V - here, don't forget it
- Local $Pic = GUICtrlCreatePic(@ScriptDir & "\pic.jpg", 0, 0, 400, 400) ;save the ctrlId
- Local $Button1 = GUICtrlCreateButton("Button1", 100, 350, 80, 30)
- Local $Button2 = GUICtrlCreateButton("Button2", 220, 350, 80, 30)
- _WinAPI_SetParent(GuiCtrlGetHandle($Button1),GuiCtrlGetHandle($Pic)) ;Set the parrent
- GUISetState()
- While 1
- Switch GUIGetMsg()
- Case -3 ;;$GUI_EVENT_CLOSE = -3
- Exit
- Case $Button1
- Exit
- Case $Button2
- Exit
- EndSwitch
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement