• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

Tab Dialog

I have built a dialog-based application using C++ MFC Appln Wizard (EXE). All is well until I began to expand (put in lot of editboxes, listboxes,etc). Soon I find that I run out of space in my dialog GUI.
One solution I can think of is to use Tab dialog (like the tab control).
Anyone know how to solve my problem.
Please give detail answer: steps
I hope that I don't have to redo my orginal dialog for this expansion.

Thanks
0
recce
Asked:
recce
  • 4
1 Solution
 
migelCommented:
Hi!
You have to replace window that created in the CYourApp::InitInstance  from your CMainDialog class to the CPropertySheet derived class.
step by step:
1. Create new class derived from CPropertySheet (say CMyProperty)
2. Create class derived from CPropertyPage for each page in the your PropertySheet
3. In the CMyProperty constructor call AddPage for each page you want.
4. In the CYourApp::InitInstance replace lines  line this:
      CAppDlg dlg;
//...
      m_pMainWnd = &dlg;
      dlg.DoModal();
to the
 CMyProperty dlg;
      m_pMainWnd = &dlg;
      dlg.DoModal();
0
 
migelCommented:
oops must be comment
0
 
captainkirkCommented:
1) the tab dialog is a good solution
2) expand the dialog resource's size until it fills the screen (yuk...)
3) create child dialogs and subdivide the functionality between them...
4) create child forms as part of your existing dialog that you can enable and make visible at will...

If any of these sounds good, we can then talk about how to do it... let me know how you want to proceed...
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
migelCommented:
als you can just replace base class for already created dialog. just replace CDialog to the CPropertyPage in the dialog`s header and implementation files.
0
 
recceAuthor Commented:
pls explain more clearly on how to do this for already created dialog.
0
 
migelCommented:
Ok.
You already have working class derived from CDialog. Our task is transform it to the CPropertyPage derived class. So we must replace base class name at each place where it appear.
excuse me for my poor English I can make little test  project and send you by Email (?)
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.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now