windows消息队列。DispatchMessage。 PostMessage

来源:互联网 发布:spark php客户端 编辑:程序博客网 时间:2024/05/18 00:09

 

如果HWND为NULL,

 

表明向当前线程发送Quit消息。。

 

大概是为了多任务的需要,Windows接管了所有的资源,以便于进行统一处理。 其中最××的就是接管了输入,并推出了消息队列的概念。 Windows为每个线程(包括主、辅、UI线程)维护一个消息队列,我们再从线程所属的消息队列中读取消息。这个消息...

 

[in] Handle to the window whose window procedure is to receive the message. The following values have special meanings.

HWND_BROADCAST
The message is posted to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows. The message is not posted to child windows.
NULL
The function behaves like a call to PostThreadMessage with the dwThreadId parameter set to the identifier of the current thread.