Hi.
i have a MFC GUI and a dll in C++. The GUI has a edit control, where the user is provided with information regarding what operation is currently carried out. i thought of calling "PostMessage" from the dll to pass that information to the GUI. ie, from the dll:-
PostMessage(hWnd, WM_USER, 0,0); // hWnd - windows handle
How can i embed the message to be displayed in the GUI with the help of WPARAM and LPARAM?
Suppose "File operation failed" is the message to be displayed in the GUI, how can i add it in the PostMessage call?
In the dialog class, following message map is given:-
ON_MESSAGE(WM_USER, &CMainDlg::OnMessage)
an event handler for this is also added:-
LRESULT CMainDlg::OnMessage(WPARAM wParam,LPARAM lParam)
{
// i have to add the message obtained here to edit control.
return 0;
}