Sign in to follow this  
Followers 0
is8591

capture rightclick on controls?

5 posts in this topic

Can rightclick be captured in OnEvent mode using GUIRegisterMsg() without setting GUICtrlSetOnEvent for each control?

Share this post


Link to post
Share on other sites

GUISetOnEvent($GUI_EVENT_SECONDARYDOWN, "RightClick")

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


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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"

Share this post


Link to post
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.

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