Solved

Dialogs within Dialogs

Posted on 1998-11-10
4
289 Views
Last Modified: 2013-11-20
I am considering the design for an object.  I want to have dialogs A, B, and C.  A and B are different, and C is essentially A and B together on one window.  Can I just make dialog C have pieces A and B as dialogs that are basically controls of dialog C?  I mean, A and B are still separate dialogs, but are also pieces of dialog C so I can avoid duplicating code that will need to be written for A and B when they are alone, and the A and B functionality of C?
0
Comment
Question by:appleby
  • 2
4 Comments
 
LVL 2

Expert Comment

by:jstolan
ID: 1324469
You can make dialogs A and B as property pages.  Then you can have a property sheet that adds either A, B or both A and B as it's property pages.  This will do most of what you want.  The only difference is that when both A and B are displayed, they will be in the tabbed format, rather than side by side.  

In addition, it has the virtue of being something with extensive support in Visual C++ and MFC.  It's always easier to work with the system.  :)
0
 

Author Comment

by:appleby
ID: 1324470
Tabbed format is unacceptable for what I need.  They have to appear side by side.
0
 
LVL 1

Accepted Solution

by:
arunprakash earned 50 total points
ID: 1324471
Here is what u want,
 Make A & B as no Border,Child,Control,NoTitle bar.
 The C now should be derived from CWnd.
 Create A & B in the CWnd in correct positions.(Modeless Mode)
 with parent as C. Now A and B are child controls for C(so that only A&B are marked as child).
 This will make it appear as the single dialog.

 When u need to display A&B as seperate dialogs add the above removed styles manually
 by Modifystyle.

Thanx ,
bye
0
 

Author Comment

by:appleby
ID: 1324472
After I use ModifyStyle, since Create has already been called, the changes don't show up.  Any idea how to force them to?  I get no borders or anything, so it shows up by itself but can't be resized, moved, or anything.  Any ideas?  I'll consider reopening as a new question...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question