Nataku Posted July 31, 2012 Share Posted July 31, 2012 Hello guys I have a problem with the pop-up GUI. I created a popup, but the problem is that when I put a background image in the window is not draggable. When i removed the background the program works well. Can anyone help me? expandcollapse popup#include <GuiConstantsEx.au3> #include <Windowsconstants.au3> #include <SendMessage.au3> Global Const $SC_DRAGMOVE = 0xF012 HotKeySet("{ESC}", "On_Exit") $hGUI = GUICreate("Gui", 800, 540, -1, -1, $WS_POPUP ) GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN") $nPic = GUICtrlCreatePic("\background.jpg", 0, 0, 800, 540) GUICtrlSetState($nPic, $GUI_DISABLE) GUICtrlCreateLabel("Title",180,45) $Title_Man = GUICtrlCreateInput("",230,40,100,20) $Sel1 = GUICtrlCreateRadio("Sel1", 180, 100) $Sel2 = GUICtrlCreateRadio("Sel2", 240, 100) $Sel3 = GUICtrlCreateRadio("Sel3", 300, 100) GUICtrlSetState($Sel1 , $GUI_CHECKED) GUISetState() While 1 sleep(10) WEnd Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam) Local $aCurInfo = GUIGetCursorInfo($hGUI) If $aCurInfo[4] = 0 Then ; Mouse not over a control _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) EndIf EndFunc Func On_Exit() Exit EndFunc Link to comment Share on other sites More sharing options...
bogQ Posted July 31, 2012 Share Posted July 31, 2012 (edited) Change line If $aCurInfo[4] = 0 Then ; Mouse not over a control to line If Not $aCurInfo[4] Or $aCurInfo[4] = $nPic Then ; Mouse not over a control(disinclude picture) Edited July 31, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Nataku Posted July 31, 2012 Author Share Posted July 31, 2012 It works!!! Thank you very much =) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now