一般來說這種Windows API在MSDN上都有比較完整的描述,這裏爲了鞏固記憶,把他記下來
BOOL WINAPI PostMessage(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
把消息分發到與創建hwnd窗口相關聯的線程的消息隊列上,不需要等待線程處理消息,即刻返回
MSDN:
Places (posts) a message in the message queue associated with the thread that created the specified window and
returns without waiting for the thread to process the message.
BOOL WINAPI SendMessage(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
這個函數直接調用hwnd窗口對應的窗口過程對消息進行處理,直到消息處理完成後才返回
MSDN:
Sends the specified message to a window or windows. The SendMessage function calls the window procedure for
the specified window and does not return until the window procedure has processed the message.