Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Offset in Edit control
#3
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)

Code:
Copy      Help
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)


Code:
Copy      Help
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)