I am trying to understand how to process the EM_GETCHARFROMPOS message to determine which character I am closest to within an edit control. Is this message being sent already to the window? or is there some command I have to invoke to get this message sent when I need it based on a mouse interaction? I've been testing with DialogBoxParam window so that may also be an issue. Any information is appreciated.
You have to send the message in the moment when you want to find that char.
lea esi, pt ; a local POINTL structure
invoke GetCursorPos, esi
invoke ScreenToClient, hRichEdit, esi
invoke SendMessage, hRichEdit, EM_CHARFROMPOS, 0, esi