943,546 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 845
  • C++ RSS
Sep 3rd, 2009
0

VC++ 6.0 : Dialog cannot show..

Expand Post »
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))
{
:estroyWindow(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
Last edited by shizu; Sep 3rd, 2009 at 6:29 am. Reason: typing error
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
shizu is offline Offline
29 posts
since Aug 2007
Sep 3rd, 2009
0

Re: VC++ 6.0 : Dialog cannot show..

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.
Reputation Points: 76
Solved Threads: 40
Junior Poster
MrSpigot is offline Offline
156 posts
since Mar 2009
Sep 4th, 2009
0

Re: VC++ 6.0 : Dialog cannot show..

HI,

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

Kindly suggest me.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Emily02 is offline Offline
2 posts
since Sep 2009
Sep 4th, 2009
0

Re: VC++ 6.0 : Dialog cannot show..

Do you have RichEdit Controls in your dialog? If yes, did you add a call to AfxInitRichEdit() to CYourApp::InitInstance()?
Reputation Points: 395
Solved Threads: 71
Posting Whiz
jencas is offline Offline
362 posts
since Dec 2007
Oct 1st, 2009
0

Re: VC++ 6.0 : Dialog cannot show..

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

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Repeated Error in Code with Header File
Next Thread in C++ Forum Timeline: Keyboard Hooking SetWindowsHookEx





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC