Solved

Displaying multiple pages

Posted on 1998-12-20
5
157 Views
Last Modified: 2013-11-20
In my application I have to display different pages on the screen. I want to create one dialog-template for each page and then display this dialog-template in a specified area in the "mother-window". What's the BEST way to do this? I tried out the CPropertsSheet-Class, but I'm not very satisfied with it.
0
Comment
Question by:joker1
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
Comment Utility
The CPropertySheets class is useful if the user only needs to see one at a time and each dialog template is a separate category. If the dialog templates are steps in a sequence, then a wizard (CPropertySheet::SetWizardMode()).

However, if the user needs to see more than one dialog template at a time, CPropertySheet is not for you. Instead, I would choose to use modeless dialogs for each and then you can either hide or show them when necessary.

If there is any relationship between the dialog templates, then you may want to consider using splitters or "a window layout manager" to manage them. A window layout manager isn't part of MFC, it is something you would need to write that would manage how these windows are related to each other. For example, you might want to have dialog one always be on top of dialog two. A layout manager would take care of that.
0
 

Author Comment

by:joker1
Comment Utility
Thanks for your answer. I like to leave the question open for a few days. If your answer is the best, I'll give you the points.
0
 

Expert Comment

by:PavelY
Comment Utility
Hi,

Why don't you use the templates to create separate dialog boxes, but set their styles to be without caption or border.
When you want to display them over some parent window, create them using CDialog::Create with style WS_CHILD and WS_VISIBLE and set the parent window to the Master dialog box.
When you want them gone, just call CWnd::ShowWindow(SW_HIDE) to hide them, or destroy them altogether with CWnd::DestroyWindow.

0
 

Author Comment

by:joker1
Comment Utility
I tried this out today. I think it will work fine. Please post your comment as an answer so I can give you the points.
0
 

Accepted Solution

by:
PavelY earned 100 total points
Comment Utility
Hi,

Thanks.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now