|
|
Tabbed Dialog Container control
Unfortunately, the standard Tab control does not have this functionality. It's relatively easy to add, so Microsoft built a PropertySheet wrapper for this reason. But even with this widget, you often miss complete control of what is going on. It also tends to do a lot of stuff to support a wizard-type look.
The Tabbed Dialog Container, on the other hand, is a bare bone Tab control.
It actually contains two controls.
CDlgContainerCtrl control
for, among others a custom Options dialog as demonstrated in my
XP UI Sample.
How to use itTo add the Tab container, place a Tab control on a dialog. Add a member variable...
In the OnInitDialog() event handler, add the following line:
Create views and add them. Same functionality as the regular CTabCtrl control.
After adding the views, call SetCurSel() to select a view.
Remember to add a reflection macro to the parent window's message map:
When a view is added to the control, the view's parent is changed to a container window internal to the tab. Do not send messages to this parent. Use the following line...
...to enable Windows XP painting of your dialog that matches the tab default interior.
Source Code DependenciesMicrosoft Visual C++ 6.0Microsoft WTL 7.0 Library Download Files
Written by Bjarke Viksoe. Article submitted 6/29/2002. To the top
|
|||