Re: TMemo: How can i get the caret x/y pos. into client x/y pos. ?
- From: "Eddy Fontaine" <someone@xxxxxxxxxxxxx>
- Date: Sat, 23 Jul 2005 08:09:31 GMT
Just in case somebody interested, ifound this in
newsgroup...
Newsgroups: borland.public.delphi.vcl.components.using
From: Mauro Patino <M-Pat...@xxxxxxxxx>
Use the GetCaretPos API function.
Read the windows sdk for more info.
procedure TForm1.Button1Click(Sender: TObject);
var
P: TPoint;
begin
GetCaretPos(P);
Label1.Caption := IntToStr(P.x);
Label2.Caption := IntToStr(P.y);
end;
If the function fails, the return value is zero.
if Get.. = 0 then
Fail
This function returns pixels x/y values as opposed to Memo.CaretPos
wich are line/char values...
Cheers,
Eddy.
.
- Follow-Ups:
- References:
- Prev by Date: Re: OpenPictureDialog Problems
- Next by Date: Re: TMemo: How can i get the caret x/y pos. into client x/y pos. ?
- Previous by thread: TMemo: How can i get the caret x/y pos. into client x/y pos. ?
- Next by thread: Re: TMemo: How can i get the caret x/y pos. into client x/y pos. ?
- Index(es):