Jump to content

capture rightclick on controls?


is8591
 Share

Recommended Posts

GUISetOnEvent($GUI_EVENT_SECONDARYDOWN, "RightClick")

In RightClick() function, do a GUIGetCursorInfo() to know over which control (if any) the mouse is.

Thanks.

Is there any way to catch it in GUIRegisterMsg()?

In GUIRegisterMsg() is very fast to get Control ID.

Link to comment
Share on other sites

No. With GUIRegisterMsg() you wouldn't catch a click if it's made over control. With $GUI_EVENT_SECONDARYDOWN you can.

$a = GUIGetCursorInfo() doesn't take ages too. $a[4] contains control ID (or zero, if no control).

"be smart, drink your wine"

Link to comment
Share on other sites

No. With GUIRegisterMsg() you wouldn't catch a click if it's made over control. With $GUI_EVENT_SECONDARYDOWN you can.

$a = GUIGetCursorInfo() doesn't take ages too. $a[4] contains control ID (or zero, if no control).

Thanks again - I just realized this after reading Help and I tried to edit my 1st reply but you beat me to it.
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...