Changing the cursor in a Rich Edit View?
Posted on 1998-02-09
I have a rich edit view in which I would like the cursor to become a standard arrow instead of an I-beam when the mouse is over it. Since this is a rich edit control, I can not change the cursor definition in the class name, because the class name is automatically changed to the rich edit class name. I have tried using SetLong to change it, but that only results in a flicker, like other solutions. I have intercepted WM_SETCURSOR in CWnd::OnSetCursor() and changed it there, but that only works most of the time. For example when the left mouse button is clicked and held and the mouse is dragged (when making a selection) the cursor changed back into an I-beam whenever it is over a part of the rich edit view that does not have text in it. I am very puzzled by this and I haven't been able to find an answer anywhere else. Please help.