How to find the cursor position in a Rich Text window?

How to find the cursor position in a Rich Text window?

Post by Greg Dalli » Thu, 26 May 2005 18:59:47


How do you find the cursor position in a Rich Text window? Is there any
particular message or function for this?
 
 
 

How to find the cursor position in a Rich Text window?

Post by Gary Chans » Fri, 27 May 2005 17:15:33


Send a EM_EXGETSEL message to get the position in the text.
Send a EM_EXLINEFROMCHAR message to convert the text position to a line
number and send a EM_LINEINDEX message to get the position of the start of the
line to get the position within the line.

--
-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.yqcomputer.com/
XXXX@XXXXX.COM