获取Richedit的可见的起始行和最后可见行号

I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
起始行:
用EM_GETFIRSTVISIBLELINE消息即可。
结束行:
Var
r: TRect;
lastvisibleline, lastlineindex: Integer;
Begin
richedit1.perform( EM_GETRECT, 0, longint( @r ));
r.left := r.left+1;
r.top := r.bottom - 2;
lastlineindex := richedit1.perform( EM_CHARFROMPOS, 0,integer(@r.topleft));
lastvisibleline := richedit1.perform( EM_EXLINEFROMCHAR, 0,lastlineindex);
end;
************************
 

Similar threads

I
回复
0
查看
2K
import
I
I
回复
0
查看
1K
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
顶部