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

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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)