Solved

How to work with em_posfromchar?

Posted on 1998-11-30
1
336 Views
Last Modified: 2010-08-05
I want to find out where the caret is in a richedit field.
Not the line or column numbers, but the position on the screen in pixels.

Please answer this question ...
0
Comment
Question by:hagur
1 Comment
 
LVL 5

Accepted Solution

by:
ronit051397 earned 50 total points
Comment Utility
procedure TForm1.RichEdit1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var
  P : TPoint;
  Point: Integer;
begin
  Point:=RichEdit1.Perform(EM_POSFROMCHAR,WParam(@P),RichEdit1.SelStart);
  caption:=inttostr(P.X)+','+inttostr(P.Y);
end;

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now