Solved

Displaying multiple pages

Posted on 1998-12-20
5
197 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

719 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