如何发送消息

518软件工作室 2006-12-29 05:58:58
我用SPY++得到了一个按扭的发送消息如下:
<00063> 001F03F2 ..message:0x0DB6[User-defined:WM_USER+2006] wParam:001F03F2 lParam:00000000
<00064> 001F03F2 ..message:0x0DB6[User-defined:WM_USER+2006]
IResult:77CE2D80

也得到了此按扭的Hwnd我在程序中如何像此按扭发送这条消息
...全文
164 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
518软件工作室 2006-12-29
  • 打赏
  • 举报
回复
像里面的复选按扭没有问题的
Aaron_Jerry 2006-12-29
  • 打赏
  • 举报
回复
反正格式就是这样,具体情况要看你的程序了
518软件工作室 2006-12-29
  • 打赏
  • 举报
回复
这样不行的不知道是怎么回事
SendMessage(hwnd,WM_USER+2006,LPARAM(hwnd),NULL);
Aaron_Jerry 2006-12-29
  • 打赏
  • 举报
回复
那就直接这样
SendMessage(hwnd,WM_USER+2006,NULL,NULL);
518软件工作室 2006-12-29
  • 打赏
  • 举报
回复
哪个0x001F03F2好像就是当前窗体的句柄
Aaron_Jerry 2006-12-29
  • 打赏
  • 举报
回复
LRESULT SendMessage(
HWND hWnd, // handle of destination window
UINT Msg, // message to send
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);

Parameters
hWnd
Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.
Msg
Specifies the message to be sent.
wParam
Specifies additional message-specific information.
lParam
Specifies additional message-specific information.
Return Values
The return value specifies the result of the message processing and depends on the message sent.
//////////////////////////////////////////////////////////////////////////////////
eg:
SendMessage(hwnd,WM_USER+2006,0x001F03F2,NULL);

miaoshengwu 2006-12-29
  • 打赏
  • 举报
回复
好像是SendMessage(.....);
前段时间用过的,
忘了参数是干什么了.

18,357

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧