ON_THREAD_MESSAGE
-
Hi Everyone, I was wondering what the difference between ON_MESSAGE and ON_THREAD_MESSAGE is? It seems in the documentation it states that when you have a CWinThread class that you should use ON_THREAD_MESSAGE. Does this mean you should use ON_THREAD_MESSAGE everywhere, or just where the thread is posting messages? Sincerly, Clint
-
Hi Everyone, I was wondering what the difference between ON_MESSAGE and ON_THREAD_MESSAGE is? It seems in the documentation it states that when you have a CWinThread class that you should use ON_THREAD_MESSAGE. Does this mean you should use ON_THREAD_MESSAGE everywhere, or just where the thread is posting messages? Sincerly, Clint
You use ON_THREAD_MESSAGE in your CWinThread derived class to handle messages sent via PostThreadMessage(). You use ON_MESSAGE to handle messages sent via SendMessage() or PostMessage() (or others) in CWnd-derived classes, even if the message in question has been sent between threads. Dave