Advertisement

MFC Tab Controls

Started by February 28, 2000 02:17 PM
2 comments, last by null_pointer 24 years, 6 months ago
I''ve used MFC a little before, so I''m not unfamiliar with it...please bear with me though as I''m no pro! I''m using VC++ 6.0 and MFC 4.2 (I think), and I have a modeless dialog box class derived from CDialog, with which I''d like to use a tab control to provide a properties dialog box for my app. (For a quick picture of what I''d like to do, see the Properties dialog box in VC -- I don''t need something too fancy like those buttons in the corner) How do I manage a tab control using MFC? I''ve used tab controls before through the CPropertySheet/CPropertyPage classes...sigh...I wish Component Gallery was still in VC. Anyway, I''d like to use VC''s dialog editor to place the controls in each tab. Does anyone know how to do this? I looked in the docs for about an hour! - null_pointer
http://www.codeguru.com/controls/index.shtml
scroll down to "Tab Controls".
That might help. They have a lot of specialized stuff.

-fel
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
Advertisement
argh! figures the site would be down today!

Well, I figured out how to get a CTabCtrl for a dialog box -- just add it as a member variable via ClassWizard for the control''s ID (doh!).

I can''t figure out how to choose what I display in those pages though...I believe borderless, captionless, modeless dialog boxes for each tab''s display area is the usual way, but now I can''t figure out how to do this. Do I add the dialog boxes as child window''s for each individual tab? Do I simply create (or display) one manually whenever the user changes tabs?

It''d be nice if the Windows dialog resource format supported all of this directly, and simply loaded the proper controls for each tab when it was selected.

Right now, I need to know how to calculate the display area of a tab -- where the controls go. I tried the AdjustRect() function, but it seems to need either the coordinates of the tab''s display area or the modeless dialog box''s rect!

There should be more documentation on this!


- null_pointer

Okay, the site''s up now! Thanks, fel!


- null_pointer

This topic is closed to new replies.

Advertisement