Jump to content

Problem with Popup window


Nataku
 Share

Recommended Posts

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?

#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

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...