954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VC++ 6.0 : Dialog cannot show..

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

shizu
Light Poster
29 posts since Aug 2007
Reputation Points: 10
Solved Threads: 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.

MrSpigot
Junior Poster
158 posts since Mar 2009
Reputation Points: 76
Solved Threads: 40
 

HI,

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

Kindly suggest me.

Emily02
Newbie Poster
2 posts since Sep 2009
Reputation Points: 10
Solved Threads: 1
 

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

jencas
Posting Whiz
366 posts since Dec 2007
Reputation Points: 395
Solved Threads: 71
 

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

shizu
Light Poster
29 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You