I was wondering if anyone else has seen this problem:
When I right click and open up a context menu in a CWnd sub-classed dialog, then go into a submenu my mouse cursor goes from the arrow to the hourglass and never reverts back to the arrow cursor until after I close the dialog box.
It doesn't seem to matter which way I create the menu (either through resources or purely by code) and I have tried overwritting the OnSetCursor function which always sets the mouse to the arrow.
I know that OnSetCursor is being called because outside of a menu the cursor is not an arrow.
Here is the sample of my code:
for cursor override:
BOOL CCMFrame::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
if (message == 0) // owner is in menu mode
// only set the cursor if the object open is a menu.
HCURSOR hCursor = LoadCursor(NULL, IDC_ARROW);
return CWnd::OnSetCursor(pWnd, nHitTest, message);
for menu creation:
<pre> CMenu mnuTop;
CMenu* pPopup = mnuTop.GetSubMenu(0);
TPM_LEFTALIGN, Point.x, Point.y, this, NULL);
Thank you for any insight into what could be causing this!!