Sign in to follow this  
Followers 0
rexx

How to detect right click on menu item

3 posts in this topic

I have a popup menu and I use _GUICtrlMenu_TrackPopupMenu() to show it, with $iButtons = 1 to enable right click on menu item.

My question is, when an item is clicked, how to know it's right or left clicked?

Share this post


Link to post
Share on other sites



GUIGetCursorInfo might work.

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites

GUIGetCursorInfo might work.

Thanks, but it checks the mouse button info after the mouse click, so the rbutton is already up.

But I found I can use

GUISetOnEvent($GUI_EVENT_SECONDARYDOWN, "MenuSecondaryDown", $hGUI)

And set a flag in MenuSecondaryDown()

then I can know whether it's right clicked or not.

Share this post


Link to post
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
Sign in to follow this  
Followers 0