PostMessage();//将消息丢在消息队列就不管了
SendMessage();//等待消息处理,同步函数
SendMessageTimeout();//可以广播信息或者单独发信息,有超时时间,可以设置处理类型,通过fuFlags来设置

fuFlags

  1. SMTO_NORMAL 超时就返回,不管消息是否起作用
  2. 其他的据以下可得
Value Meaning
SMTO_ABORTIFHUNG
0x0002
The function returns without waiting for the time-out period to elapse if the receiving thread appears to not respond or "hangs."
SMTO_BLOCK
0x0001
Prevents the calling thread from processing any other requests until the function returns.
SMTO_NORMAL
0x0000
The calling thread is not prevented from processing other requests while waiting for the function to return.
SMTO_NOTIMEOUTIFNOTHUNG
0x0008
The function does not enforce the time-out period as long as the receiving thread is processing messages.
SMTO_ERRORONEXIT
0x0020
The function should return 0 if the receiving window is destroyed or its owning thread dies while the message is being processed.
```c LRESULT SendMessageTimeoutA( [in] HWND hWnd, [in] UINT Msg, [in] WPARAM wParam, [in] LPARAM lParam, [in] UINT fuFlags, [in] UINT uTimeout, [out, optional] PDWORD_PTR lpdwResult ); ```