Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Examples of CTabCtrl?

334 views
Skip to first unread message

joeprogrammer

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to
I would be grateful if anyone can supply (or direct me to) a good example
(that is easy for someone somewhat new to VC++) of the use of the CTabCtrl.
Particularly, how to display different controls as the tabs are selected.

I am not wanting to use a CPropertySheet. I want to use a CTabCtrl embedded
in a dialog box with other controls.

I have tried to follow the example (old code it seems) that is in the MSDN
disk that came with the VC++ 6.0 package but, so far, without much luck.

I have also looked at an example on www.codeguru.com and it does not seem to
be exactly what I want and there seems to be problems (from subsequent
posts) with that implementation.

Thanks in advance.

George

David Merrifield

unread,
Feb 9, 1999, 3:00:00 AM2/9/99
to
Hi

I don't know if this is the sample you have seen but search on the MSDN
for:- "FIRE: Demonstrates Windows 95 Common Controls"

However I would recommend you do use property pages, the reason being the
TabCtrl is quite nasty. Basically to use it you have to drag all your
controls for all of the tabs on to the dialog and show or hide controls
depending on which tab is selected. When you have a lot of controls it
becomes an absolute nightmare. I maintain an App that uses this approach and
it is very easy when adding controls to create wierd problems with Z-orders
of controls.

At least with property pages the controls live with the appropriate page

Hope this helps

Dave
joeprogrammer wrote in message
<#xbBx49U#GA....@uppssnewspub05.moswest.msn.net>...

Anti_Snoop

unread,
Feb 9, 1999, 3:00:00 AM2/9/99
to
Sure, look here to put dialog resources into a tab control:
http://www.snoopsoft.com/mfc.html

- Anti_Snoop

joeprogrammer <nob...@nowhere.com> wrote in message
news:#xbBx49U#GA....@uppssnewspub05.moswest.msn.net...

joeprogrammer

unread,
Feb 9, 1999, 3:00:00 AM2/9/99
to
Thank Your Anti_Snoop!!!
This looks like it. I am going to look this over.

Anti_Snoop wrote in message ...

joeprogrammer

unread,
Feb 11, 1999, 3:00:00 AM2/11/99
to
Thanks for pointing me to this info. It took a while, but I was able to
determine how to use it to get the controls into the tab control. However,
I am fighting a problem with input focus.

I have this dialog-based app. Within the parent dialog box is the tab
control with two tabs. Each tab has several controls on it.

Outside the tab control is a picture control displaying a bitmap and, at the
moment, only the OK button. I can select the tabs and select edit boxes
within the tabs. I can use the Tab key to tab between edit boxes within the
tab pages.

HOWEVER, when I leave the tab control example, use the Tab key to move focus
to the OK button outside the Tab Control, any subsequent mouse click
anywhere, including within the Tab Control, locks the application up.

Can you give my any ideas?

I am struggling to learn MFC.

Thanks.

George

Anti_Snoop wrote in message ...
>Sure, look here to put dialog resources into a tab control:
>http://www.snoopsoft.com/mfc.html
>
>- Anti_Snoop
>
>joeprogrammer <nob...@nowhere.com> wrote in message
>news:#xbBx49U#GA....@uppssnewspub05.moswest.msn.net...
>>I would be grateful if anyone can supply (or direct me to) a good example
>>(that is easy for someone somewhat new to VC++) of the use of the
CTabCtrl.
>>Particularly, how to display different controls as the tabs are selected.
>>

tii...@my-dejanews.com

unread,
Feb 12, 1999, 3:00:00 AM2/12/99
to
Hi,

I have written an dialog based application with the TabCtrl as on of the
controls. The TabCtrl has a few pages and each page with more controls
(cedit's). It has been a nightmare trying to the have focus to stay and move
from one control to the other on the page withing the TabCtrl.

Anyone have any luck acheiving this? Please let me know....

The tab orders works great when I use these as property pages....

Thanks...


In article <O5$q8ABV#GA....@uppssnewspub05.moswest.msn.net>,


"David Merrifield" <david_me...@multilex.com> wrote:
> Hi
>
> I don't know if this is the sample you have seen but search on the MSDN
> for:- "FIRE: Demonstrates Windows 95 Common Controls"
>
> However I would recommend you do use property pages, the reason being the
> TabCtrl is quite nasty. Basically to use it you have to drag all your
> controls for all of the tabs on to the dialog and show or hide controls
> depending on which tab is selected. When you have a lot of controls it
> becomes an absolute nightmare. I maintain an App that uses this approach and
> it is very easy when adding controls to create wierd problems with Z-orders
> of controls.
>
> At least with property pages the controls live with the appropriate page
>
> Hope this helps
>
> Dave
> joeprogrammer wrote in message
> <#xbBx49U#GA....@uppssnewspub05.moswest.msn.net>...

> >I would be grateful if anyone can supply (or direct me to) a good example
> >(that is easy for someone somewhat new to VC++) of the use of the CTabCtrl.
> >Particularly, how to display different controls as the tabs are selected.
> >
> >I am not wanting to use a CPropertySheet. I want to use a CTabCtrl
> embedded
> >in a dialog box with other controls.
> >

> >I have tried to follow the example (old code it seems) that is in the MSDN
> >disk that came with the VC++ 6.0 package but, so far, without much luck.
> >
> >I have also looked at an example on www.codeguru.com and it does not seem
> to
> >be exactly what I want and there seems to be problems (from subsequent
> >posts) with that implementation.
> >
> >Thanks in advance.
> >
> >George
> >
> >
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Anti_Snoop

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
It has been quite a long time since I've used these classes. I'll try and
look into it for you, but you'll need to email me your real email address
and we can take this discussion offline.

- Anti_Snoop (anti_...@snoopsoft.com)

joeprogrammer <nob...@nowhere.com> wrote in message

news:OuKjaFjV#GA....@uppssnewspub05.moswest.msn.net...

0 new messages