I am trying to get menu/submenu name on mouse left click.For this i need to get some notification when i click on that particular menu/submenu.Look if somebody has the idea to do that?
+3
A:
Instead of reacting to WM_LBUTTONDOWN
for a menu, you should instead listen for the WM_COMMAND
notification. Windows takes care of all the details of handling mouse movement and clicks within menus.
Greg Hewgill
2009-12-11 10:00:29
The WM_CONTEXTMENU message is what you should use, not WM_COMMAND or WM_LBUTTONDOWN.
Stefan
2009-12-11 16:45:09
The WM_CONTEXTMENU notification is for a *right click* (or Shift+F10 or the context menu key), not for a *left click* as the original question requested.
Greg Hewgill
2009-12-11 20:39:33
Greg, thnx for reply.WM_COMMAND is not giving any notification when i click on menu/submenu.Please help.
Vishal
2009-12-18 07:50:41
I can't suggest any more than I already have unless you post some of your source code.
Greg Hewgill
2009-12-18 08:21:51
A:
To work with menu/submenu there is a totally different WMs is Look in MSDN for this WM_MENUSELECT for example
Thnx ginger.But WM_MENUSELECT is not working while clicking on menu/submenu.
Vishal
2009-12-18 07:51:55