[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Displaying multiple pages

Posted on 1998-12-20
5
Medium Priority
?
204 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 400 total points
ID: 1326450
Hi,

Thanks.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

649 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