Hello!
I don't know how to do one thing: when menu item is selected I want that text associated with this item is display in status bar. I've tried with MenuHelp function but it doesn't work. :/ Plz help!
I don't know how to do one thing: when menu item is selected I want that text associated with this item is display in status bar. I've tried with MenuHelp function but it doesn't work. :/ Plz help!
Try using WM_MENUSELECT message, which is sent to the onwer of the menu.
WM_MENUSELECT
uItem = (UINT) LOWORD(wParam); // menu item or submenu index
fuFlags = (UINT) HIWORD(wParam); // menu flags
hmenu = (HMENU) lParam; // handle of menu clicked
See MS SDK for details.
WM_MENUSELECT
uItem = (UINT) LOWORD(wParam); // menu item or submenu index
fuFlags = (UINT) HIWORD(wParam); // menu flags
hmenu = (HMENU) lParam; // handle of menu clicked
See MS SDK for details.
Hi,
catch WM_MENUSELECT as Vaxon already stated.
Usually it is a good idea to have the strings to be displayed inside
a resource. So you may add (lets say 10000) to the menu identifier
passed in WParam (lets say 2001) and just grab the string with
resource id 12001 then set it up with SB_SETTEXT to the status bar.
That way you can handle lots of menu entries with just a few lines of code.
Bye Miracle
catch WM_MENUSELECT as Vaxon already stated.
Usually it is a good idea to have the strings to be displayed inside
a resource. So you may add (lets say 10000) to the menu identifier
passed in WParam (lets say 2001) and just grab the string with
resource id 12001 then set it up with SB_SETTEXT to the status bar.
That way you can handle lots of menu entries with just a few lines of code.
Bye Miracle