CWindow::PostMessage

在消息队列将消息与创建窗口的线程。

BOOL PostMessage( 
   UINT message, 
   WPARAM wParam = 0, 
   LPARAM lParam = 0  
) throw();

备注

在参见 Windows SDK的 PostMessage

返回,而不等待线程处理消息。

示例

//The following example attaches an HWND to the CWindow object and  
//posts a WM_PAINT message to the Window wrapped by the CWindow object  
//using CWindow::PostMessage() with the default values of WPARAM and  
//LPARAM

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.PostMessage(WM_PAINT);

要求

Header: atlwin.h

请参见

参考

CWindow Class

CWindow::SendMessage

CWindow::SendNotifyMessage