01-30-2014, 02:46 PM
Thanks, this seems like it will be perfect. When I try though, I get a number returned but same number no matter what the x,y coordinates are. It must be my syntax. I first tried with POINT p, but then check on MSDN and they say POINTL. I tried with both. No difference:
cid is from RichEdit control
Any thoughts? I think I am close!
Thanks so much,
S
cid is from RichEdit control
POINT p; xm(p cid) ;;get mouse position into p.x and p.y
int cursorPos = SendMessage(cid EM_CHARFROMPOS 0 &p)
out cursorPos
POINTL p;
p.x = xm
p.y = ym
int cursorPos = SendMessage(cid EM_CHARFROMPOS 0 &p)
out cursorPos
Any thoughts? I think I am close!
Thanks so much,
S