PostMessage
-
I have a Dialog based application . I want to post message from this dialog to another class which is alos part of the same application. Say When I click a button,this dialog posts a message to another class. How should I achieve this? how should I know about the class recieve that particular message? Pls guide me with sample code. Regards YKUT
-
I have a Dialog based application . I want to post message from this dialog to another class which is alos part of the same application. Say When I click a button,this dialog posts a message to another class. How should I achieve this? how should I know about the class recieve that particular message? Pls guide me with sample code. Regards YKUT
put that in the first dialog const unsigned int wm_uiImportDone=RegisterWindowMessage("Import_Done"); give wm_uiImportDone as a pointer to the class on the class, mae sure to add that to the message map ON_REGISTERED_MESSAGE(wm_uiImportDone, OnImportDone) then on the dialog, use: ::PostMessage (m_hWnd, wm_uiImportDone, 0, 0); when m_hwnd is a pointer to the class that has to be derived from a window to get a message