01-30-2014, 01:58 AM
Thanks, that works perfect!
Now I am trying to take it to the next level. Rather than confirming that I am within an offset range (of a certain text str) by getting the cursorpos (after a left click or arrow navigation)
, I would like to determine this merely on hover-over. I think this may be impossible but is it possible to get the cursorpos (offset) of where the mouse cursor (not the text control cursor) is hovering (x,y) WITHOUT giving a lef click to the edit control?
It is easy to do if I put a lef command into my rep loop, but that obviously messes up the user experience.
This may be impossible or too difficult given that the text size may change in a rich edit by ctrl-mousewheel and other interactions, but just thought I would check.
Are there other ways to see if you are hovered over a certain text string in an edit control?
Thanks,
S
Now I am trying to take it to the next level. Rather than confirming that I am within an offset range (of a certain text str) by getting the cursorpos (after a left click or arrow navigation)
int i; ARRAY(CHARRANGE) arrSearch
if(findrx(WholeText Searchstr 0 1 arrSearch)<0) out "does not match"; ret
for i 0 arrDitselInsert.len
,int offsetmin(arrSearch[i].cpMin) length(arrSearch[i].cpMax-arrSearch[i].cpMin) offsetmax(arrSearch[i].cpMax)
int cursorPos; SendMessage(c EM_GETSEL 0 &cursorPos)
if cursorPos >= offsetmin and cursorPos <= offsetmax
, I would like to determine this merely on hover-over. I think this may be impossible but is it possible to get the cursorpos (offset) of where the mouse cursor (not the text control cursor) is hovering (x,y) WITHOUT giving a lef click to the edit control?
It is easy to do if I put a lef command into my rep loop, but that obviously messes up the user experience.
This may be impossible or too difficult given that the text size may change in a rich edit by ctrl-mousewheel and other interactions, but just thought I would check.
Are there other ways to see if you are hovered over a certain text string in an edit control?
Thanks,
S