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 tabbed dialog. Activates the specified tab and the associated page.
C++
BOOL CSftTabsDialog::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 tabbed dialog. Activates the specified tab and the associated page.
A tabbed dialog'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 tabbed dialog.
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 tabbed dialog and activates the second tab:
///////////////////////////////////////////////////////////////////////////// // CMainDlg message handlers BOOL CMainDlg::OnInitDialog() { // call base class CSftTabsDialog::OnInitDialog(); int index; /* Associate the tab control created from the dialog */ /* resource with the C++ object. */ m_Tab.SubclassDlgItem(IDC_TAB, this /* parent window */); /* Initialization is faster if we set redraw off */ m_Tab.SetRedraw(FALSE); /* We are using new features */ m_Tab.SetVersion(SFTTABS_6_5); ... additional tab initialization ... index = m_Tab.AddTab(_T("&Six")); m_Tab.SetTabInfo(index, &Tab5); // If you don't want to attach a page to the tab, the following is optional // m_Tab.SetTabDialog(index, new an_object_based_on_CSftTabsPage(this)); // tab page m_Tab.SetControlInfo(&CtlInit); // Make sure to turn redraw back on m_Tab.SetRedraw(TRUE); m_Tab.InvalidateRect(NULL, TRUE); // If you are not using the sheet/page classes, remove the ... // Initialize tab control InitializeTabControl(1, &m_Tab, NULL); return FALSE;
See Also C/C++ API | C++ Classes | Notifications