Hi all,
I have a question here..
I am using microsoft visual C++ 6.0 with SP4 and SP5..
I call a DoModal()
, but there was nothing dialog show out..
below are my codes..
CDlgA oDlgA;
oDlgA.DoModal();
but no dialog show out..
then I trace the debug code, found out that under CWnd::CreateDlgIndirect(...)
function..
BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate,
CWnd* pParentWnd, HINSTANCE hInst)
{
...
until here,
hWnd = NULL and m_nFlags = 16
hWnd = :: CreateDialogIndirect(hInst, lpDialogTemplate,
pParentWnd->GetSafeHwnd(), AfxDlgProc);
after this line, hWnd != NULL and m_nFlags = 256
...
// handle EndDialog calls during OnInitDialog
if (hWnd != NULL && !(m_nFlags & WF_CONTINUEMODAL))
{
::DestroyWindow(hWnd);
hWnd = NULL;
}
...
}
Anything wrong cause that dialog cannot show..??
Actually I show fews dialog..
when 1st dialog's button press, 2nd dialog will show..
but now only 1st dialog is show, 2nd dialog fail to show out after call DoModal()..
Please advise..
Thank you..
shizu