Jump to content

Recommended Posts

Posted (edited)

So I have a gui that that spawns a context menu. This menu has a number of submenu items and regular items. When hovering over a submenu or between them all is good, but if I don't want to wait for the hover and I click, the sub menu opens, but if I instead move the mouse to another submenu item that isn't inside the previously spawned sub menu, the entire context menu closes.

Code:
gist:5f07cab22975d133624e381d92bab61f (github.com)

Thanks!

Edited by Biatu

What is what? What is what.

Posted

1.3K+ lines of code, and you want us to debug it ?  Good luck with that ! 

Unless you provide a snippet with a reasonable size showing the issue, not sure someone here will invest his/her time in it.  I for one am out until then...

Posted

It may not solve your issue, but did you try to remove the $MNS_AUTODISMISS style from this line ?

_GUICtrlMenu_SetMenuStyle($ghCtxMain,$MNS_NOCHECK+$MNS_AUTODISMISS)

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted (edited)
27 minutes ago, pixelsearch said:

It may not solve your issue, but did you try to remove the $MNS_AUTODISMISS style from this line ?

_GUICtrlMenu_SetMenuStyle($ghCtxMain,$MNS_NOCHECK+$MNS_AUTODISMISS)

Unfortunately no, when clicking the "clip" submenu then immediately clicking the "Macros" menu the context menu is still closed. I attempted to also use Spy++ /w GuiRegisterMsg to attempt to intercept and stop the menu from being closed but it's beyond me. 

Edited by Biatu

What is what? What is what.

Posted
26 minutes ago, Biatu said:

Unfortunately no,

It would have been too easy :D

You did test by removing the $MNS_AUTODISMISS style from these 2 lines, right ?

_GUICtrlMenu_SetMenuStyle($ghCtxMain,$MNS_NOCHECK+$MNS_AUTODISMISS)
...
_GUICtrlMenu_SetMenuStyle($hCtrl,$MNS_NOCHECK+$MNS_AUTODISMISS) ; $iType=2 (submenu ?)

Let's hope someone will be able to bring a working solution. Good luck.

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted
1 hour ago, pixelsearch said:

It would have been too easy :D

You did test by removing the $MNS_AUTODISMISS style from these 2 lines, right ?

_GUICtrlMenu_SetMenuStyle($ghCtxMain,$MNS_NOCHECK+$MNS_AUTODISMISS)
...
_GUICtrlMenu_SetMenuStyle($hCtrl,$MNS_NOCHECK+$MNS_AUTODISMISS) ; $iType=2 (submenu ?)

Let's hope someone will be able to bring a working solution. Good luck.

Yes I did, if it helps I can strip everything down to just the UI, just kind of swapped atm and I've been troubleshooting this one for a couple months now. Thanks again for checking it out.

What is what? What is what.

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
  • Recently Browsing   0 members

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