CTabCtrl Versus CPropertyPage in Dialog 
Author Message
 CTabCtrl Versus CPropertyPage in Dialog

I have placed Property Pages in a dialog by way of Creating a
CPropertySheet Derived class, and adding CPropertyPages to it that use
dialog resources for each page.  Each PropertyPage derived class than
handles its own messages.  I optionally can have access to the
controls from the dialog directly since it owns the CPropertySheet
derived object and hence the property pages added to the sheet.  The
Property Sheet is positioned in the Dialog by way of using a static
text control as a reference location.

Now There is also CTabCtrl which I did not use mainly because I am
more used to CPropertySheets, however it I suppose I could have used
that, but then I would have needed to determine a way to place butons
and handle messages (Probably by Subclassing I suspect).

So my question is this:

What advantages / Disadvantages are there to Using the CPropertySheet
Method I described above versus a CTabCtrl and how would one go about
easily layouting the controls on a CTabCtrl item and handling the
messages from those controls?

-Brad



Wed, 07 Jul 2004 13:38:29 GMT  
 CTabCtrl Versus CPropertyPage in Dialog

Quote:

> I have placed Property Pages in a dialog by way of Creating a
> CPropertySheet Derived class, and adding CPropertyPages to it that use
> dialog resources for each page.  Each PropertyPage derived class than
> handles its own messages.  I optionally can have access to the
> controls from the dialog directly since it owns the CPropertySheet
> derived object and hence the property pages added to the sheet.  The
> Property Sheet is positioned in the Dialog by way of using a static
> text control as a reference location.

> Now There is also CTabCtrl which I did not use mainly because I am
> more used to CPropertySheets, however it I suppose I could have used
> that, but then I would have needed to determine a way to place butons
> and handle messages (Probably by Subclassing I suspect).

> So my question is this:

> What advantages / Disadvantages are there to Using the CPropertySheet
> Method I described above versus a CTabCtrl and how would one go about
> easily layouting the controls on a CTabCtrl item and handling the
> messages from those controls?

> -Brad

I use a CTabCtrl only when I want the tabs to be only a small portion of
a larger dialog.  CPropertySheet gives you a dialog, CTabCtrl will sit
in some existing dialog.  When using CTabCtrl it is easiest to create a
modeless, titlebar-less, borderless, dialog and dialog resource for each
page, then handle the controls within each modeless dialog class.  I.e.,
almost the same way CPropertySheet does it, but you have to do more of
the work.

--
Scott McPhillips [VC++ MVP]



Thu, 08 Jul 2004 00:12:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CTabCtrl and sub-dialogs in modal CPropertyPages/CDialogs

2. C code check : SPLINT versus PC-LINT versus QA/C versus POLYSPACE versus PURIFY

3. No CTabCtrl or CPropertyPage GURUS???

4. Which one do I need: CTabCtrl, CPropertyPage, CPropertiySheet

5. CPropertyPage into CTabCtrl?

6. Dialog containing a CTabCtrl containing a modeless dialog box, shortcuts don't work

7. Q:Adding multi dialog templates to CTabCtrl in base dialog

8. Data Access Performance of XML, versus SQL versus Text File

9. browse directory versus file open dialog

10. CPropertyPage calling functions on another CPropertyPage

11. Views versus dialogs

12. CPropertyPage or not CPropertyPage, that is here the question

 

 
Powered by phpBB® Forum Software