If a panel is made part of a tab (InsertPanelAsTabPage) or if a panel handle is obtained from a tab (GetPanelHandleFromTabPage), there are some restrictions as to how you can use that panel. Some of those restrictions could be lifted if the panel knew which tab it belonged to.
I suggest the addition of the following (or similar) attributes:
GetPanelAttribute(Panel, ATTR_PANEL_PARENT_TAB_CTRL, &TabCtrl);
GetPanelAttribute(Panel, ATTR_PANEL_PARENT_TAB_INDEX, &TabIndex);
And of course you can already get the parent panel with:
GetPanelAttribute(Panel, ATTR_PANEL_PARENT, &ParentTab);
So, now that a panel knows the tab it belongs to, some obvious associations can be handled by the UIR library:
This would allow the user to select at runtime if he wants a Multiple Panels application (MDI) or a Single Panel/Multiple Tab application (tabbed SDI) and almost no changes are necessary to the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.