Click to See Complete Forum and Search --> : CTabCtrl and PropertySheets


elevator
April 1st, 1999, 04:57 PM
Good evening,
I am having a small problem here. I am constructing a tab control inside a CPropertySheet. My problem
is that no matter what I do the tab control fires an assert upon creation. I have been able to construct a
tab control in a dialog using the exact same code as for the one I am attempting to make on the property sheet with no luck so far. Do the Property sheet have some special things with it that I am missing out on? I thought the problem was that I for some reason created the tab control before the property sheet and so it would assert. But that's not it. Just for the record: the application I am making have a number of property sheets appearing inside a CView pending user selection from a CTreeCtrl.

Any input would be greatly appreciated.
Thank you.


Ken V. Nordberg
Faculty of Computer Engineering, Tromso/Norway
elevator@online.no

April 1st, 1999, 09:27 PM
Hi.

You misunderstand the difference between Tab control and propertysheet.
As long as I remember, Propertysheet is published at Window3.1 and Tab control
is published at Windows 95.
To be sure, you can get Tab control by GetTabControl on ProperySheet in order
to modify tab, like add picture.
As a result, we have two choices and one OLE choice.
1) Use CPropertysheet class and CPropertyPage class
2) Use CTabControl class and Dailog class.
3) Or use OleControl.

We can't mix CPrpertySheet class and CTabControl class.

Hope for help.
-Masaaki Onishi-

April 2nd, 1999, 06:16 AM
Hi,

I've written some code that will allow you to use tab controls as propertysheets. I basically subclass the tab control, then add in dialog resources in a similar method as you would with propertypages. But there is no propertypage class, as I wanted all messages and button ids to go to the parent of the tab control, so everything is self contained. I can email you the source code if you want.


Mike Appleby

mike@maqcs.freeserve.co.uk

elevator
April 2nd, 1999, 09:15 AM
My mistake. What I am using is of course CPropertyPage and not CPropertySheet. Is the problem the
same with the both or do this make the situation different? I am still having the problem with an assert firing when constructing the CTabCtrl in the CPropertyPage.

Thank you for your reply.


Ken V. Nordberg
Faculty of Computer Engineering, Tromso/Norway
elevator@online.no

elevator
April 2nd, 1999, 09:16 AM
Right now I am pretty much stuck so I'd appreciate any code and examples you can give me. Thank you for your reply, it's much appreciated.


Ken V. Nordberg
Faculty of Computer Engineering, Tromso/Norway
elevator@online.no