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

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.

HI,

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

Kindly suggest me.

Member Avatar for jencas

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

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..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.