
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]