RichEdit CONTEXTMENU Cursor Fix
if your having trouble with the RichEdit control not displaying the proper cursor during a right click contextmenu, here is the fix for it...
Code:
////the message handler
case WM_SETCURSOR:
{
if(m_bMenuOpen)
{
HCURSOR m_hArrow = LoadCursor(NULL,IDC_ARROW);
::SetCursor(m_hArrow);
return TRUE;
}
break;
}
////////////////////////
///the menu function...
m_bMenuOpen = TRUE;
TrackPopupMenu(hMenu,0,pt.x,pt.y,0,m_hWnd,NULL);
m_bMenuOpen = FALSE;
///////////////////////////
the standard ::SetCursor does not work for the RichEdit controls, figured this would help some people out doing searches on here, I know I found nothing on the net or during searches on here on the subject
Re: RichEdit CONTEXTMENU Cursor Fix
Quote:
Originally Posted by
12oclocker
if your having trouble with the RichEdit control not displaying the proper cursor during a right click contextmenu, here is the fix for it...
EDIT: removed code
the standard ::SetCursor does not work for the RichEdit controls, figured this would help some people out doing searches on here, I know I found nothing on the net or during searches on here on the subject
Hello, 12oclocker. I signed up for this forum just so I could make this post!! :)
Firstly: THANK YOU! I was just wondering why SetCursor was not working...!
I was completely unaware I needed to return TRUE as opposed to returning nothing at all.
There appears to be a slight lack of information when it comes to the Win32 API and MSDN. :(