Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC
How can i add a dialog in a dialog in MFC.
Can i help me?
THANKS!!
Posted 13-Nov-12 6:16am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It works the same. You create an instance of the dialog class and call it. It doesn't care where it is.
  Permalink  
Comments
thongtran297 at 13-Nov-12 11:38am
   
Can you explain it clearly? I don't understand how to do it.
Christian Graus at 13-Nov-12 11:40am
   
It makes no difference that you're inside a dialog. You do it the same as you do it elsewhere. Why are you learning MFC in 2012 ? C# is a far better choice if you're starting out.
thongtran297 at 13-Nov-12 11:51am
   
I know C#. If you can answer my question, please. Don't ask me about java or c#.
I explain clearly my question:
I have a parent dialog and a child dialog.
My prolem is: how can i show "parent dialog" and "child dialog" in it.
Christian Graus at 13-Nov-12 11:53am
   
Do you mean the child is a new dialog, or embedded inside the parent ? I think perhaps your question is not clear.
thongtran297 at 13-Nov-12 11:57am
   
No it isn't the new dialog.
example:
i have a list of something and control in a dialog,
and now i want add this dialog to a difference dialog
Christian Graus at 13-Nov-12 12:00pm
   
OK, you can't easily embed a dialog in a dialog, it's just like C#. The best thing is to create a control, and embed that in a dialog to use as a dialog, and in the other dialog to embed it with other things added.
CPallini at 13-Nov-12 12:54pm
   
Shouldn't you embed the controls of the dialog, instead of the dialog itself?
Christian Graus at 13-Nov-12 12:57pm
   
That's precisely what I said, or at least, what I meant to say
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

The way to do this in MFC is to create your re-usable dialog and make it into a custom control. It's been many years since I did this last, but have a look at:
Creating Custom Controls and
Creating embedded dialogs in MFC.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

You can use tab order dialogs in your parent dialog. Please check the link
Creating embedded dialogs in MFC[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

hi
 
CFileDialog f(1);
f.DoModal();
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

hi may be you want to create a dialog control.if that is fine then a lot of stuffs are already available on the codeproject
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 638
1 Sergey Alexandrovich Kryukov 445
2 ProgramFOX 275
3 CHill60 225
4 Maciej Los 215
0 OriginalGriff 550
1 Sergey Alexandrovich Kryukov 470
2 Maciej Los 310
3 ProgramFOX 275
4 Peter Leow 250


Advertise | Privacy | Mobile
Web04 | 2.8.150331.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100