Jump to content

GUIGETMSG() returning mouse event codes...not controlids


sshrum
 Share

Recommended Posts

GUIGetMsg() is only returning mouseevent codes (-7, -8, -11 = mousedown, mouseup, mousemove). It's not returning the control ID. I need to get control IDs so I can assign functions to the various picture controls I have on my gui.

FYI: I have 1 background picture (disabled) and numerous picture controls on top of that. Would this setup cause the reaction that I am seeing?

TIA

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Link to comment
Share on other sites

As long as you don't have layered images and your GUI is not disabled the event code would look like this

$oGUI = GUICreate("Player-Gui", 1024, 768, -1, -1, $WS_POPUP)
GUISetBkColor(0x000000)
$oArtist = GUICtrlCreateLabel("",0,0,1024,768, BitOR($SS_CENTER,$SS_CENTERIMAGE))
while 1
    $msg = GUIGetMsg()  
    if $msg <> 0 Then
        switch $msg
            case $oArtist; picture object
                _CurrentQueryArtist
        endswitch
    endif
wend

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

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...