社区
Delphi
帖子详情
已知道HANDLE,怎样使用sendmessage给tmemo控件添加一行呀!兄弟着急呀!
illheart
2004-09-02 12:55:52
分不够再加
...全文
92
3
打赏
收藏
已知道HANDLE,怎样使用sendmessage给tmemo控件添加一行呀!兄弟着急呀!
分不够再加
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
楚人无衣
2004-09-02
打赏
举报
回复
看下是不是这样:
procedure TForm1.Button1Click(Sender: TObject);
var
s: string;
begin
s := Memo1.Text;
s := s + 'season is autumn';
SendMessage(Memo1.Handle, WM_SETTEXT, 200, Integer(PAnsiChar(s)));
end;
SongCH080910
2004-09-02
打赏
举报
回复
偶也在等待噢!
beyondtkl
2004-09-02
打赏
举报
回复
先不要加分了,偶也想知道。。
利用Windows消息获取Memo的行和列.rar_DELPHI 消息_delphi memo_memo
利用Windows消息获取Memo的行和列 是了解Windows消息的基础实例!
Memo
控件
光标定位
LRESULT
SendMessage
( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam )
SendMessage
( Memo1.
Handle
, EM_LINEFROMCHAR, Memo1.SelStart, 0); //光标所在的行号
SendMessage
( Memo1.
Handle
, EM_LINEIN
高亮选中MEMO某
一行
选中第5行 //转到指定行并选中这行的文本 procedure SelectLine(Memo1:
TMemo
; ln: Integer); begin Memo1.SelStart :=
SendMessage
(Memo1.
Handle
, EM_LINEINDEX, ln - 1, 0); Memo1.SelLength := Length(Memo1.Lines...
Memo
控件
光标定位过程
procedure CursorPosition(Control:
TMemo
; col, row: integer);var Pos: integer;begin //检查行数是否超过了实际行数! 超过时即选最后
一行
if Col>Control.Lines.Count then Col:=
SendMessage
(Control.
Handle
, EM_GETLINECOUNT, 0, 0)
delphi 高亮选中MEMO某
一行
http://www.delphitop.com/html/kongjian/2641.html选中第5行 //转到指定行并选中这行的文本 procedure SelectLine(Memo1:
TMemo
; ln: Integer); begin Memo1.SelStart :=
SendMessage
(Memo1.
Handle
, EM_LINEINDEX, ln - 1,...
Delphi
5,930
社区成员
262,938
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章