Ok, first first coding in C using win32 api, no mfc, no.net, no wxwidgets. I created a window with the WC_TABCONTROL class and added tabs to it, everything works fine, except that ... I need to have content on each tab, I got the impression from msdn that I needed to create a dialog for each page, and then load the dialog when the user selects the tab. The only problem with this is my main window, this is not a dialog, so making a dialog for a tab is perfect, it doesn't work too well.
So I'm wondering if there is a better way to do this? I was thinking about just hiding and showing different controls per tab, but that doesn't seem like a good idea.
I would like it to resize the window and tab control to the minimum size required for all tabs (3-4 tabs) when launching my application, and the window will not change, which I think makes it a little easier. I did this following the example in msdn (loading each dialog box into memory, switching over each of them and setting RECT to the minimum size needed to resize everything), the problem is that the size is in the units of the dialog box, and I don’t I can convert it to pixels because I do not have HWND in the dialog yet.
Basically, my question is the best way to manage controls in a window using a tab control. Therefore, if I have a tab control and the user moves from tab1 to tab2, I want various controls to be displayed to the user.
Josh
source share