I actually found out what was wrong, it doesn't seem to work with a Point, this is how it should look:
LRESULT charPos = SendMessage(Memo1->Handle, EM_CHARFROMPOS, 0, MAKELPARAM((WORD)X,(WORD)Y));
I use Borland's TMemo textpad and want to know the character position of my mouse cursor in the Memo, so in MouseMove I do the following:
// X and Y are in client space
void __fastcall MyApp::Memo1MouseMove(TObject *Sender, TShiftState Shift, int X, int Y)
{
TPoint mousePos;
mousePos.x = X...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.