This documentation is archived and is not being maintained.

CWinThread::PostThreadMessage 

Called to post a user-defined message to another CWinThread object.


BOOL PostThreadMessage(
   UINT message ,
   WPARAM wParam,
   LPARAM lParam 
);

Parameters

message

ID of the user-defined message.

wParam

First message parameter.

lParam

Second message parameter.

Nonzero if successful; otherwise 0.

The posted message is mapped to the proper message handler by the message map macro ON_THREAD_MESSAGE.

NoteNote

When calling the Windows PostThreadMessage function within an MFC application, the MFC message handlers are not called. For more information, see the Knowledge Base article, "PRB: MFC Message Handler Not Called with PostThreadMessage()" (Q142415).

Show: