Hi all,
I have created a simple win32 app, it opens a dialog box and is modeless, but im having some trouble with closing the dialog box,
this is the message handaler for it,
BOOL CALLBACK Deck1DlgProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
HWND g_hToolbar = NULL;
switch(Message)
{
case WM_COMMAND:
switch(LOWORD(wParam))
{
case WM_CLOSE:
EndDialog(g_hToolbar,0);
return 0;
case WM_DESTROY:
EndDialog(g_hToolbar,0);
PostQuitMessage(0);
break;
}
break;
default:
return FALSE;
}
return TRUE;
}
all i want it to do is to return back to my main window, once the x is clicked in the top right hand corner i though this could be achived by
case WM_CLOSE:
EndDialog(g_hToolbar,0);
return 0;
cheers for any help.
[edited by - Emexus on June 5, 2003 11:47:35 AM]