SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Initializes a tab control in a page. Activates the specified tab and the associated page.
C++
BOOL CSftTabsPage::InitializeTabControl(int iTab, CSftTabs* pTabCtl, CWnd* pFrame = NULL);
iTab
The zero-based index of the tab to be made the active tab.
pTabCtl
A pointer to the tab control's CSftTabs based object.
pFrame
A pointer to a window's CWnd based object. This window will be used by SftTabs/DLL as client area for pages attached to the tab control. SftTabs/DLL uses this window's client area size and location as a replacement for the tab control's client area. The window described by pFrame may be hidden and/or disabled. If an application resizes or moves the frame window, the dependent page or Windows control also has to be resized by using the ResizePages function. Using this frame window, the client area of a tab control can be located anywhere in relation to the tab control even on a different dialog or window. This parameter may be NULL, in which case the tab control's client area is used for attached pages.
The return value is TRUE if the function was successful, otherwise FALSE is returned.
The InitializeTabControl function initializes a tab control in a page. Activates the specified tab and the associated page.
A page's tab control has to be initialized, which creates the page attached to the currently active tab. This is typically done in the OnInitDialog member function of the page.
This function is only used for pages which contain tab controls. A main tabbed dialog would use CSftTabsDialog::InitializeTabControl instead.
When a tabbed dialog is destroyed, all attached CSftTabsPage objects are automatically destroyed and deleted (using the C++ delete operator).
This example initializes the tab control of a page and activates the second tab:
///////////////////////////////////////////////////////////////////////////// // CPageDlg message handlers BOOL CPageDlg::OnInitDialog() { // call base class CSftTabsPage::OnInitDialog(); int index; SFTTABS_TAB Tab; // Attach the tab control window to the CSftTabs object m_Tab1.SubclassDlgItem(IDC_P6_TAB1, this /* parent window */); ... additional tab initialization ... index = m_Tab.AddTab(_T("Si&xth")); m_Tab.SetTabInfo(index, &Tab5); m_Tab.SetTabDialog(index, new CPage6(this));/* tab page */ m_Tab.SetControlInfo(&CtlInit); // Initialize tab control InitializeTabControl(1, &m_Tab, NULL); return FALSE; }
See Also C/C++ API | C++ Classes | Notifications