sndmessage的一些用途......
[QUOTE]1,获得MEMO中的光标位置.
Lops:=SendMessage(memol.Handle,EM_LINEFROMCHAR,Memol.SelStart,0);//光标所在的行号
Cpos:=SendMessage(meno1.Handle,EM_LINEINDEX,Lpos,0);//光标所在的字符位置
LineLength:=SendMessage(memol.handle,EM_LINELENGTH,Cpos,0);//这行的字符数.
2,开关显示器.
SendMessage(Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0);//关闭显示器.
SendMessage(Handle, WM_SYSCOMMAND, SC_MONITORPOWER, -1);//打开显示器.
3,有人问我如何让Memo翻页,我试了一下,
Next:
sendmessage(memo1.handle,wm_keydown,VK_NEXT,-1);
sendmessage(memo1.handle,wm_keyup,VK_NEXT,-1);
Prev:
sendmessage(memo1.handle,wm_keydown,VK_PRIOR,-1);
sendmessage(memo1.handle,wm_keyup,VK_PRIOR,-1); [/QUOTE]