Solved

Displaying multiple pages

Posted on 1998-12-20
5
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1326446
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
ID: 1326447
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
ID: 1326448
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
ID: 1326449
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
ID: 1326450
Hi,

Thanks.

0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Host to IP 7 83
Pressing cancel button with C# UI Automation 3 92
while loop over for loop 7 116
My project did see openJDK that I installed. What could be the problem 7 162
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.

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