Can't see anything posted about this, so I'll ask:
If I have and edit control, and in it are some words say...
These are some words
And I place the edit position in front of the word "are", which would be position 7 in the string of these words, how can I get that position i.e. 7?
Can this be done any one?
Any examples you can post please?
Thanks,
Andy.
Not sure, but does GetCaretPos do the trick?
Brian
On looking, I think it must be this SENDMESSAGE:
https://docs.microsoft.com/en-us/windows/win32/controls/em-getcaretindex
The proper IWB command for finding the 0 based index of the caret in a line is:
CONTROLCMD window | dialog, ID, @EDGETSELECTION, varStart, varEnd
If nothing is selected then varStart=varEnd = 0 based index of caret
Thanks guys,
Will give it whirl!
Andy.
:)