今天同事問了一個問題,說在線程中send message 和直接調用是不是一樣,他覺得是一樣的,但是線程跟蹤卻發現處理過程是在接收消息隊列完成。回家看到博客園上的一番爭論才有些明白,這裡貼出來,共勉
http://bbs.csdn.net/topics/390715501?page=1
If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message.