Sign in to follow this  

question on VC++ 6.0 [MFC]

This topic is 4766 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'm in the process of creating a utility program for a game I'm designing. The main form view has a tree control containing all the items. You select an item, then click 'Edit Properties' to modify that item. Upon doing so, a dialog box opens up. Now to my problem... I want to put in a CTabCtrl object to organize the data, as there is quite a bit of it. I know how to create the ctrl, and I have a member variable setup for it in the dialog box. I don't, however, know how to add tabs or anything else to the control. I've searched online for tutorials, and cant find any that seem to cover this. I also can't seem to find any books that cover the topic very well. If anybody here could help me get started on this, I'd appreciate it greatly. Trickhat

Share this post


Link to post
Share on other sites
You have to code it. You have to make a seperate dialog for each tab and load that dialog whenever the appro. tab is clicked on.
This is the type of thing that VB/Delphi/BCB/ and now .Net made much easier.

You can use ActiveX controls in MFC apps, though I never waded through that process so I don't know how easy or difficult it is. That would let you use the same tabbed dialog control that VB6 has.

Share this post


Link to post
Share on other sites
Well, I thought I got as far as inserting some tabs, but I keep getting "Assertion" errors...I have no idea what these are, or how to fix them...any ideas?

The code was as follows...

CTabCtrl m_tab;
m_tab.InsertItem(0, "Test");
//the above line produces an assertion error

Trickhat

Share this post


Link to post
Share on other sites

This topic is 4766 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this