Tab Control and Property Sheet 
Author Message
 Tab Control and Property Sheet

I'm been reading some discussions on how to implement Tab Control (using
PropertySheet +
 PropertyPage) but unable to make any progress on what to do next after
the following steps:

 1. I've created a project (MFC exe, single doc) and also have created
CMyPropPage1, CMyPropSheet1
 & CMyPropPage2, CMyPropSheet2.

 2. In each Property Sheet header file, I've added member var to
 CPropertySheet-derived class

 public:
   CMyPropPage1 m_myPage1;

 3. Added the property page to my property sheet in the class's
 constructor:
 CMyPropSheet1::CMyPropSheet1(....)
 {
   AddPage( &m_myPage1 );
 }

 I know that the next step I need to do is to add the Property Page to
each tab with CTabCtrl.  Where do
 I do this (in CMainFrame::OnCreate function ?) and how ?

 Thanks in advance for your help

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 26 Jan 2003 03:00:00 GMT  
 Tab Control and Property Sheet

Quote:

> I'm been reading some discussions on how to implement Tab Control (using
> PropertySheet +
>  PropertyPage) but unable to make any progress on what to do next after
> the following steps:

>  1. I've created a project (MFC exe, single doc) and also have created
> CMyPropPage1, CMyPropSheet1
>  & CMyPropPage2, CMyPropSheet2.

>  2. In each Property Sheet header file, I've added member var to
>  CPropertySheet-derived class

>  public:
>    CMyPropPage1 m_myPage1;

>  3. Added the property page to my property sheet in the class's
>  constructor:
>  CMyPropSheet1::CMyPropSheet1(....)
>  {
>    AddPage( &m_myPage1 );
>  }

>  I know that the next step I need to do is to add the Property Page to
> each tab with CTabCtrl.  Where do
>  I do this (in CMainFrame::OnCreate function ?) and how ?

>  Thanks in advance for your help

When you use CPropertySheet and CPropertyPage you never do anything with the tab
control.  The basic purpose of CPropertySheet is to encapsulate the tab control
and its child dialogs for you.  You also seem to be making one sheet for each
page.  The basic idea is to make one sheet and put several pages into it.  The
pages will appear on the tabs all by themselves.

--
Scott McPhillips [VC++ MVP]



Sun, 26 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Tab control VS. Property sheet

2. Subclass tab control in property sheet?

3. Tab Controls and Property Sheets

4. Tab Control or Property Sheet?

5. TAB Controls or Property SHeet/Pages?

6. Property Sheets and Tab Control

7. Property Sheets and Tab Control

8. Tab and property sheets control...

9. Property sheet with no tab control?

10. Property Sheet Tab Control and TCS_VERTICAL Style

11. Property Sheets v/s Tabbed Control

12. moving tab control in a property sheet

 

 
Powered by phpBB® Forum Software