I am trying to switch over to an arrow cursor when the user mouses over the client area of a Rich Edit control. I've tried two things:
#1) capture WM_SETCURSOR:
case WM_SETCURSOR:
// when mouse over the client area of the rich-edit subwindow,
// set the cursor to an arrow .. this is so the Navigator has a
// "pointer" style cursor
if (wParam == (UINT)hListingOut) {
SetCursor (LoadCursor(NULL, IDC_ARROW));
return TRUE; // no further processing
}
break;
This seems to switch the cursor momentarily, but something is switching it back to the standard "edit" style cursor.
#2) change the cursor in the window class:
SetClassLong (hListingOut, GCL_HCURSOR,
(LONG)LoadCursor (NULL, IDC_ARROW));
This doesn't seem to do anything for me.
The window is created as:
hListingOut = CreateWindowEx (
WS_EX_CLIENTEDGE | WS_EX_STATICEDGE ,
"RichEdit", NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE |
ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL |
ES_MULTILINE | ES_LEFT | ES_AUTOHSCROLL | ES_SAVESEL |
ES_READONLY ,
0, 0, 1, 1, hwnd, (HMENU) IDD_LIST,
hInst, NULL);
Anyone got any ideas on how to change the mouse cursor for a rich edit window declared within a dialog (and keep it changed) ?
Thanks,