CWindow::SendMessage
将消息发送到窗口,并返回,直到窗口过程处理消息。
LRESULT SendMessage(
UINT message,
WPARAM wParam = 0,
LPARAM lParam = 0
) throw();
static LRESULT SendMessage(
HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam
) throw();
备注
在参见 Windows SDK的 SendMessage。
示例
// The following example attaches a HWND to the CWindow
// object and sends a WM_PAINT message to the window
// wrapped by CWindow object using CWindow::SendMessage.
CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.SendMessage(WM_PAINT, 0L, 0L);
要求
Header: atlwin.h