请各们大侠给我详细介绍SendMessage函数的用法。谢谢
句柄如何引用, 比如HICON,HWND
句柄如何引用, 比如HICON,HWND
解决方案 »
- 双缓冲的问题
- ShowWindow DLL中创建无模式对话框
- MapX 非地球坐标系怎样设置 坐标原点?
- CheckListBox控件如何响应事件
- 问问大家,只有头文件和DLL没有LIB文件,能不能调用DLL里面的导出函数!
- 散分帖——庆祝在非技术区升两星!——1
- 绝对简单的问题:请问在MFC中对话框对象如何访问视图中的数据?
- 关于构造函数的问题?????????????///////
- [重分求解]DLL的问题,大家帮帮忙啊
- 将已经存在的SQL语句参数化,急求!
- 经常听说C++可以操作系统底层,我想知道在什么时候需要对底层操作,怎么实现将C++与Delphi混合编程?
- 为什么我用__dllspec(dllexport)做的dll导出函数,用工具查看怎么有怪符号?
Platform SDK: Windows User Interface
SendMessage
The SendMessage function sends the specified message to a window or windows. It calls the window procedure for the specified window and does not return until the window procedure has processed the message. To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function. LRESULT SendMessage(
HWND hWnd, // handle to destination window
UINT Msg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
Parameters
hWnd
[in] 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
[in] Specifies the message to be sent.
wParam
[in] Specifies additional message-specific information.
lParam
[in] Specifies additional message-specific information.
Return Values
The return value specifies the result of the message processing; it depends on the message sent. Res
Applications that need to communicate using HWND_BROADCAST should use the RegisterWindowMessage function to obtain a unique message for inter-application communication.If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message. Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.See Also
Messages and Message Queues Overview, Message and Message Queue Functions, InSendMessage, PostMessage, PostThreadMessage, RegisterWindowMessage SendDlgItemMessage, SendMessageCallback, SendNotifyMessage Built on Thursday, May 11, 2000Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
See Also
Messages and Message Queues Overview, Message and Message Queue Functions, InSendMessage, PostMessage, PostThreadMessage, RegisterWindowMessage SendDlgItemMessage, SendMessageCallback, SendNotifyMessage
不过好像有高人总结过MFC消息事件的参数等信息,
http://www.csdn.net/expert/topic/758/759000.xml?temp=.3059046
看看这个吧:)