Menu Question
-
how can i know on which menu item, the mouse pointer is currently hovering in MFC doc/view architecture?
-
how can i know on which menu item, the mouse pointer is currently hovering in MFC doc/view architecture?
Abhijeet Pathak wrote:
how can i know on which menu item, the mouse pointer is currently hovering
Try
WM_MENUSELECT
.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
-
Abhijeet Pathak wrote:
how can i know on which menu item, the mouse pointer is currently hovering
Try
WM_MENUSELECT
.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
thanks that works great for normal menu items... but if i tried to retrieve menu string (caption) of menu item which contains popup menu then it fails. how can i retrieve caption of an menu item which contains popup (sub) menu. i'm facing difficulties because such menu items don't have an ID. :(
-
thanks that works great for normal menu items... but if i tried to retrieve menu string (caption) of menu item which contains popup menu then it fails. how can i retrieve caption of an menu item which contains popup (sub) menu. i'm facing difficulties because such menu items don't have an ID. :(
Abhijeet Pathak wrote:
but if i tried to retrieve menu string (caption) of menu item which contains popup menu then it fails.
When it's a popup menu then it won't have a command id but it will have an index right. You get index in LOWORD( WPARAM ). Use
MF_BYPOSITION
withGetMenuString
to retrieve menu string. :~ Tell me if it works.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com