changing selection in richedit
SPONSORED LINKS
1. I have a richedit control in a dialogbox. And I need to get notified when the caret position has changed (that is, when the selection has changed). Unfortunately, when I click with the mouse or use the keyboard, that causes the caret to change position, the richedit control does not send any EM_SETSEL or EM_EXSETSEL, so I don’t know when it happens.
Do ye have any idea besides handling WM_KEYDOWN & WM_KEYUP & WM_LBUTTONDOWN & WM_RBUTTONUP & WM_MOUSEMOVE (the user may drag the cursor to select)?
2. I have a curiosity, if you can tell me. When the user clicks inside a rich edit control, how can be known where to place the caret (to be between characters)? I’d like to make something happen when the user hovers a certain portion of text (i.e. some words written in red, bold, whatever).