Adding a control to a tab control 
Author Message
 Adding a control to a tab control

I am having a really rough time trying to add a treecontrol to on of the
tabs on a tab control. I can do this easily in any language but VC++ because
it seems like I cant drag and drop the control onto the tab. Is this the
case. How would I add a tree control to a tab on a tab control. Visually or
in code. Thanks in advance. An examples or places where I can get good
examples
would be appreciated.

Ryan Taylor



Sat, 31 Jan 2004 22:28:13 GMT  
 Adding a control to a tab control

Quote:

> I am having a really rough time trying to add a treecontrol to on of the
> tabs on a tab control. I can do this easily in any language but VC++ because
> it seems like I cant drag and drop the control onto the tab. Is this the
> case. How would I add a tree control to a tab on a tab control. Visually or
> in code. Thanks in advance. An examples or places where I can get good
> examples
> would be appreciated.

> Ryan Taylor


It's not clear what the problem is, but the usual approach is to create
a modeless dialog for each tab page (with titlebar and border styles
off).  Put the control on the modeless dialog.  Put the modeless dialog
on top of the tab control (SetWindowPos) and make only one modeless
dialog visible at a time when the user clicks a tab.

--
Scott McPhillips [VC++ MVP]



Sat, 31 Jan 2004 22:43:25 GMT  
 Adding a control to a tab control

Quote:
> It's not clear what the problem is, but the usual approach is to create
> a modeless dialog for each tab page (with titlebar and border styles
> off).  Put the control on the modeless dialog.  Put the modeless dialog
> on top of the tab control (SetWindowPos) and make only one modeless
> dialog visible at a time when the user clicks a tab.

> --
> Scott McPhillips [VC++ MVP]

The problem is in VB, DEPLHI, and BUILDER, controls can be dragged and
dropped onto a tab control in order to avoid unneccesary coding for the
programmer. I havent been able to find a way to do this in VC++ 6.0.  And I
have found any code examples of how to do it otherwise. I am a VC++ 6.0
newbie. Any examples would be very helpful.

Thanks again.

REWT



Sat, 31 Jan 2004 22:53:28 GMT  
 Adding a control to a tab control
I think you got your answer. The underlying common control is not
what you see in those environments - they add the pages Scott
mentioned for you. In raw VC++ you have to work with the raw
control, hence you have to provide the tab pages yourself...

As an alternative, you can use the OCX version of the tab control
which is the one to provide the tab pages. The original common
control is not a control container (to put it in VB terms).

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> > It's not clear what the problem is, but the usual approach is to create
> > a modeless dialog for each tab page (with titlebar and border styles
> > off).  Put the control on the modeless dialog.  Put the modeless dialog
> > on top of the tab control (SetWindowPos) and make only one modeless
> > dialog visible at a time when the user clicks a tab.

> > --
> > Scott McPhillips [VC++ MVP]

> The problem is in VB, DEPLHI, and BUILDER, controls can be dragged and
> dropped onto a tab control in order to avoid unneccesary coding for the
> programmer. I havent been able to find a way to do this in VC++ 6.0.  And
I
> have found any code examples of how to do it otherwise. I am a VC++ 6.0
> newbie. Any examples would be very helpful.

> Thanks again.

> REWT



Sun, 01 Feb 2004 02:34:48 GMT  
 Adding a control to a tab control

Quote:

> The problem is in VB, DEPLHI, and BUILDER, controls can be dragged and
> dropped onto a tab control in order to avoid unneccesary coding for the
> programmer. I havent been able to find a way to do this in VC++ 6.0.  And I
> have found any code examples of how to do it otherwise. I am a VC++ 6.0
> newbie. Any examples would be very helpful.

> Thanks again.

I guess you're not using MFC.  In MFC the CPropertyPage and
CPropertySheet classes do all this for you.  If you are used to and want
the higher-level libraries then consider using MFC.  It's got the most
classes and IDE support and code samples of any of the development
options available in VC.

--
Scott McPhillips [VC++ MVP]



Sun, 01 Feb 2004 03:13:40 GMT  
 Adding a control to a tab control
You'll get this support if you are using property pages without MFC
too. The original poster seems to be using the raw tab control
outside of the context of property pages.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:

> > The problem is in VB, DEPLHI, and BUILDER, controls can be dragged and
> > dropped onto a tab control in order to avoid unneccesary coding for the
> > programmer. I havent been able to find a way to do this in VC++ 6.0.
And I
> > have found any code examples of how to do it otherwise. I am a VC++ 6.0
> > newbie. Any examples would be very helpful.

> > Thanks again.

> I guess you're not using MFC.  In MFC the CPropertyPage and
> CPropertySheet classes do all this for you.  If you are used to and want
> the higher-level libraries then consider using MFC.  It's got the most
> classes and IDE support and code samples of any of the development
> options available in VC.

> --
> Scott McPhillips [VC++ MVP]



Mon, 02 Feb 2004 06:27:47 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Adding a control to a tab control

2. Adding a control to a tab control

3. How to Add My own Property Tab in the PropertyGrid for Button Control

4. adding controls to tab pages

5. Adding things to Tab Controls

6. Adding dialogs using Tab Control (CTabCtrl)

7. How to Add a tabbed control to CFormView???

8. Newbie->How to add Tabbed control to child window

9. Newbie->How to add Tabbed control to child window

10. How to add controls in TAB?

11. How to Add a tabbed control to CFormView???

12. Tab Control With RichText Control

 

 
Powered by phpBB® Forum Software