0

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

Edited by happygeek: fixed formatting

4
Contributors
4
Replies
6
Views
7 Years
Discussion Span
Last Post by shizu
0

Did you override OnInitDialog() in your dialog?
If so, try simplifying it or step through it. A serious error here could reset the WF_CONTINUEMODAL flag and cause the dialog to exit.

0

HI,

I have two option which one choose me. can you suggest me which one i choose. like DBMS, Web Applications

Kindly suggest me.

0

Do you have RichEdit Controls in your dialog? If yes, did you add a call to AfxInitRichEdit() to CYourApp::InitInstance()?

0

Hi..

Thanks for reply..
I don't use any Rich Edit..and i put breakpoint under OnInitDialog() before, it not even go in this breakpoint..
means before OnInitDialog() function, It already return out, so that my dialog cannot show out.
And for my dialog, I didn't make any control on it. No static box, edit box control. Nothing in the dialog.

shizu..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.