您的位置:首页 > 其它

pb中获取多行文本编辑框(mle控件)指定行的内容

2011-04-11 17:03 405 查看
//API函数定义

function long SendMessage(ulong hWnd, uint msg, long wParam, ref string lParam) library "user32.dll" alias for "SendMessageA"




//取第row行的文本

constant long EM_GETLINE = 196
string ls
ulong length, row
row = 2 //取第几行
ls = space(1000)
length = SendMessage(handle(mle_1), EM_GETLINE, row - 1, ls) //row - 1表示取得第row行的文本,0为起始
ls = trim(ls)
messagebox("取第" + string(row) + "行", "文本内容:" + ls + "~r~n文本长度:" + string(length))
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: