VC++ 6.0 : Dialog cannot show..

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2007
Posts: 16
Reputation: shizu is an unknown quantity at this point 
Solved Threads: 0
shizu shizu is offline Offline
Newbie Poster

VC++ 6.0 : Dialog cannot show..

 
0
  #1
Sep 3rd, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 143
Reputation: MrSpigot is on a distinguished road 
Solved Threads: 34
MrSpigot's Avatar
MrSpigot MrSpigot is offline Offline
Junior Poster

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

 
0
  #2
Sep 3rd, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 2
Reputation: Emily02 is an unknown quantity at this point 
Solved Threads: 1
Emily02 Emily02 is offline Offline
Newbie Poster

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

 
0
  #3
Sep 4th, 2009
HI,

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

Kindly suggest me.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 360
Reputation: jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice 
Solved Threads: 69
jencas jencas is offline Offline
Posting Whiz

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

 
0
  #4
Sep 4th, 2009
Do you have RichEdit Controls in your dialog? If yes, did you add a call to AfxInitRichEdit() to CYourApp::InitInstance()?
If you are forced to reinvent the wheel at least try to invent a better one!

Please use code tags - Please mark solved threads as solved
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 16
Reputation: shizu is an unknown quantity at this point 
Solved Threads: 0
shizu shizu is offline Offline
Newbie Poster

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

 
0
  #5
Oct 1st, 2009
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..
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC