1

Since couple weeks I'm trying to figure out how can I select (choose) item on popup menu which is extended to another popup submenu. For example:

 HMENU hMenu,hSubMenu;
 hMenu = CreatePopupMenu();
 hSubMenu = CreatePopupMenu();
 AppendMenu(hMenu , MF_POPUP | MF_STRING | MF_ENABLED, (UINT_PTR) hSubMenu, name.c_str()); // this one i want to select and choose on callback
 AppendMenu(hMenu , MF_POPUP | MF_STRING, (UINT_PTR) count, name.c_str());

Than I'm trying to get Callback with: WM_MENUSELECT to catch the name of hover element. But when I click on this hSubMenu element - menu don't want disappear, but is still active and extends submenu elements.

WM_INITMENUPOPUP will not help.

I just want to close this popup menu when i get message back from WM_MENUSELECT. WM_LBUTTONUP doesn't work on popup menu...

Could You give me some advice? I'm coding with pure winapi.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.