SendMessage和postmessage怎么用 15
加入记事本的句柄是12456请问如何用这两个API函数向记事本发送字符串消息,函数调用我会,就是不知道里面的参数怎么选用。PrivateDeclareFunctionSe...
加入记事本的句柄是12456
请问如何用这两个API函数向记事本发送字符串消息,函数调用我会,就是不知道里面的参数怎么选用。
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
第一个参数是句柄我懂,问题是后面三个参数,哪个参数表示字符串,如何表示? 展开
请问如何用这两个API函数向记事本发送字符串消息,函数调用我会,就是不知道里面的参数怎么选用。
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
第一个参数是句柄我懂,问题是后面三个参数,哪个参数表示字符串,如何表示? 展开
2个回答
展开全部
ByVal hwnd As Long, //指接受消息程序或控件的句柄
ByVal wMsg As Long, //要发送的消息
ByVal wParam As Long, //附加内容1
lParam As Any //附加内容2
SendMessage函数,发送消息,而且在消息得到处理后才返回
PostMessage函数,发送消息,但不等消息得到处理就返回了
ByVal wMsg As Long, //要发送的消息
ByVal wParam As Long, //附加内容1
lParam As Any //附加内容2
SendMessage函数,发送消息,而且在消息得到处理后才返回
PostMessage函数,发送消息,但不等消息得到处理就返回了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询