L
linganmm
Guest
Hi, all,
I create a right-click menu through ContextMenuManager in my SDI program as follows:
void CmyView::OnRButtonUp(UINT nFlags, CPoint point)
{ ......
((CWinAppEx*)AfxGetApp())->GetContextMenuManager()->ShowPopupMenu(myMenu->GetSafeHmenu(), point.x, point.y, this);
}
So upon right click the client area, a menu is pop up. If I move my mouse to an item of it (not click, just put on it), the item will be highlighted as follows, and that's ok.
What I need is that, when I put my mouse to different items of the menu, different pictures or text or whatever will be shown in the client area. For example, when the mouse is moved to "Entry 1", then text "entry 1" will be output in the client area (without destroying menu), and then if the mouse is moved to "Entry 2", then text "entry 2" will be output.
So I need to track the message that highlights the menu entry, right? but I don't know how to do that.
I tried CmyView::OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu) in my View, but looks the message WM_MENUSELECT is not emitted at all.
Anyone knows which message to track and how to handle it?
Thank you very much!
Continue reading...
I create a right-click menu through ContextMenuManager in my SDI program as follows:
void CmyView::OnRButtonUp(UINT nFlags, CPoint point)
{ ......
((CWinAppEx*)AfxGetApp())->GetContextMenuManager()->ShowPopupMenu(myMenu->GetSafeHmenu(), point.x, point.y, this);
}
So upon right click the client area, a menu is pop up. If I move my mouse to an item of it (not click, just put on it), the item will be highlighted as follows, and that's ok.
What I need is that, when I put my mouse to different items of the menu, different pictures or text or whatever will be shown in the client area. For example, when the mouse is moved to "Entry 1", then text "entry 1" will be output in the client area (without destroying menu), and then if the mouse is moved to "Entry 2", then text "entry 2" will be output.
So I need to track the message that highlights the menu entry, right? but I don't know how to do that.
I tried CmyView::OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu) in my View, but looks the message WM_MENUSELECT is not emitted at all.
Anyone knows which message to track and how to handle it?
Thank you very much!
Continue reading...