I was wondering if there is a Window class for making window tabs, like the tabs in the Display pane in the control panel. i want to add multiple tabs to my window, but not with MDI, just add them as controls in the window.
I was wondering if there is a Window class for making window tabs, like the tabs in the Display pane in the control panel. i want to add multiple tabs to my window, but not with MDI, just add them as controls in the window.
HA! I WIN!
The Display pane is a dlg with a TAB control.
If the controls required are complex I use a seperate small dlg to hold them, created in the resouce editor (rather than on the fly).
I create the smaller dlgs when the parent dlg is called. Hiding the ones I do not need.
On a TAB change I hide the current smaller dlg and show the required one.
I handle move msgs from the parent dlg to ensure the smaller dlgs stay in the right spot.
Property pages can also be used (MFC CPropertyPage and CPropertySheet classes)
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Well, I don't use MFC at all as I only have the express edition of visual c++, and i don't like to use resource files to do the work; i enjoy being able to create on the fly. Is there a class for a window tab similar to the EDIT or BUTTON class? You also mention that the display area of the tab is a window with a tab control, correct? How do i add a tab control to a window?
Last edited by xixpsychoxix; 03-28-2009 at 09:12 PM.
HA! I WIN!
No using the correct tool for the job will make it harder.
TAB
WC_TABCONTROL
Creatte a TAB control like any other control.
To add items use the TabCrl_InsertItem() macro or send a TCM_INSERTITEM msg.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Writing code for tab controls without using MFC or some third party library will not be a fun exercise. It can be done for sure but I certainly would not want to do it.
I've put together some very simple POC code using Tab Controls which dynamically creates as many tabs as needed "on the fly" using 6 functions and approximately 70 lines of code.