Hi all,
Ok, this should be simple. Creating a dialog box from within a dialog
box. Anything special needed? Mine returns a -1 (failure) everytime.
Thanks,
Nigel
Heres the code:
case IDC_ADVANCED:
if((DialogBox (hinst, MAKEINTRESOURCE(IDD_ADVANCED), hdlg,
(DLGPROC)advanceddialog)) == -1)
MessageBox(hdlg, "Could not open Advanced Box", "Advanced DB Failed",
MB_ICONINFORMATION | MB_OK);
break;
.
.
.
.
BOOL CALLBACK advanceddialog(HWND hdlg, UINT iMsg, WPARAM wParam,
LPARAM lParam)
{
static char tempbuffer[150];
//int count;
switch (iMsg)
{
case WM_INITDIALOG :
MessageBox(hdlg, "Hello World", "Hello World", MB_OK);
return TRUE;
case WM_COMMAND :
switch (LOWORD (wParam))
{
case IDOK :
case IDCANCEL :
EndDialog (hdlg, 0) ;
return TRUE ;
}
break ;
}
return FALSE ;
}