Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CTabCtrl ?? How to use it???

Status
Not open for further replies.

sirbeatsalot

Programmer
Dec 7, 2001
11
US
I am using CTabCtrl to make simple tabs. However I can't place any controls on the tabs at design time through the VC++6.0 Dialog editor. I don't see how to do it through code either??? I can rig it by detecting when a tab is clicked and then manually hiding each control that is supposed to be on that tab. Its too much work, there has to be an easier way.

PLZZZZZ HELP!!!!

Thanks
 
All you have to do is;

CTabCtrl pTabs;

// get handle of control
pTabs.SubclassDlgItem(IDC_TAB1,this);

// create the tabs
pTabs.InsertItem("Monday");
pTabs.InsertItem("Tuesday");
 
Sorry, that should have read;

pTabs.InsertItem(0,"Monday");
pTabs.InsertItem(1,"Tuesday");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top