trichview.support
Re: GetCaretPos() and RichViewEdit1.GetItemCoord() |
Author |
Message |
Sergey Tkachenko |
Posted: 08/23/2002 17:44:36 Yes, caret coordinates may be not exactly equal to item coordinates (both x and y). What are you trying to implement? May be I can suggest another way. > If I am at the beginning of the editor where CurItemNo = 0 > > GetCaretPos(p1); > RichViewEdit1.GetItemClientCoords(RichViewEdit1.CurItemNo, p2.X, p2.Y); > RichViewEdit1.GetItemCoords(RichViewEdit1.CurItemNo, p3.X, p3.Y); > > Result: > > p1.X = 5 > p1.Y = 4 > > p2.X = 5 > p2.Y = 6 > > p3.X = 5 > p3.Y = 6 > > There X value is correct, however, their Y value varies...Would you have any > ideas ? > > |
Powered by ABC Amber Outlook Express Converter