Re: Popup menu
- Posted by CChris <christian.cuvier at agriculture.gouv.fr> Mar 19, 2007
- 591 views
Pete Stoner wrote: > > Hi Guys, > I have a win32lib prog with a hidden window that opens a popup menu at the > cursor > position, there's one last thing I am trying to get working... > > Is there a notification I can act on when the menu disappears? i.e. the user > opens the popup menu then clicks elsewhere on the screen without selecting any > menu item so the menu just 'goes away' and I want to be able to trigger a > routine > when this happens, but I haven't been able to find an event notification for > it. > > Regards PeteS This works in my modified version, by firing w32HCloseUp on the menu. So far, I had no signal from Derek on whether he plans to absorb this, and a few other, change into the official lib. A quick fix would be to set a raw message handler for your hidden window listening for the WM_EXITMENULOOP message. As I understand it, your window only has one menu, so this could be the way to go. This trick won't tell you if submenus of your popup menu were closed, only the menu itself. CChris