SendMessage和PostMessage的区别在于,前者线程等待函数返回后者不等待。
MSDN:
SendMessage:It calls the window procedure for the specified window and does not return until the window procedure has processed the message.
PostMessage:function 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.