send message from thread to extended MFC DLL
-
hi can any one tell me that how can i send message from a thread to the dll main, actually i thread is within the dll, now there is a need to display the message that stop the thread for a moment asking the user request to continue or not, now i want this message to be displayed from the dll and not from the thread (i.e outside the thread), i studied about send message and postmessages, but what actually should i do ,, i shall be thankful for ur help thanks
-
hi can any one tell me that how can i send message from a thread to the dll main, actually i thread is within the dll, now there is a need to display the message that stop the thread for a moment asking the user request to continue or not, now i want this message to be displayed from the dll and not from the thread (i.e outside the thread), i studied about send message and postmessages, but what actually should i do ,, i shall be thankful for ur help thanks
This is my understanading of the problem... 1. You have an application and a dll 2. You are creating a thread which thread proc is in the DLL function 3. You need to send a message to the Thread which reside insode the dll.. Am I right? PostMessage and SendMessage are used to send or post a message to the same proc.. Obviously they are belongs to the Window and processed by the Window Proc. As you know Window and Thread are fundamentally different.. In your case, your have two threads (minimum, one is your application thread and another one is dll thread... For sending messages between the threads you have to use PostThreadMessage() function. For that you need the thread id of the destination. Hope this help you.. Let me know if you need more information... :) " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan