Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Denix Linelli

Visual C++ 6.0 and dialog resources

This topic is 6495 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I would like to know how to make a tab control work properly. Where are the tabs defined, and how do I get the controls into the tabs? Everything I''ve tried has just gotten a nice set of 5 default tabs named "tab 1" through "tab 5" and no effect whatsoever on any other controls. How is it done?

Share this post

Link to post
Share on other sites
I think MS dropped the ball on this one... in delphi or VB or CB, when you add a control on top of a tab control it knows to make the new control a child of the tab control - in VC everything you add is a child of the dialog; which is exactly what you don''t want.

Sooooo, as far as I can tell, you have to create the items inside the tab control with code, probably in the OnInitDialog method

look here

CTabCtrl* m_tabStatus = GetDlgItem(IDC_TAB1);
m_tabStatus.InsertItem(1, "Status1");//Adds a tab

m_tabStatus.InsertItem(2, "Status2");//Adds antoher tab

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!