News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

EM_GETCHARFROMPOS message processing

Started by Konai, December 17, 2014, 08:25:01 AM

Previous topic - Next topic

Konai

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.

jj2007

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