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
Standard constructor.
C++
public: CSftTabsPage::CSftTabsPage(UINT id, CWnd* pParent); CSftTabsPage::CSftTabsPage(LPCTSTR lpszResource, CWnd* pParent);
id
ID of the dialog resource used to create the dialog.
lpszResource
A null-terminated string containing the name of the dialog resource used to create the dialog.
pParent
A pointer to the parent window's CWnd based object. This parameter may not be NULL. The parent window must be an object derived from CSftTabsPage or CSftTabsDialog.
A page attached to a tab control is created automatically by SftTabs/DLL in response to user input or under program control by calls such as CSftTabsDialog::InitializeTabControl or SetCurrentTab. All pages created by SftTabs/DLL are created as modeless dialogs.
This example creates several CSftTabsPage objects which are attached to the tab control:
BOOL CMainDlg::OnInitDialog() { int index; SFTTABS_TAB Tab; /* Associate the tab control created from the dialog */ /* resource with the C++ object. */ m_Tab.SubclassDlgItem(IDC_TAB, this /* parent window */); /* You could use DDX/DDV instead and add the following */ /* line to the DoDataExchange function of the tab */ /* control's parent window (remove the //). */ // DDX_Control(pDX, IDC_TAB, m_Tab); /* Initialization is faster if we set redraw off */ m_Tab.SetRedraw(FALSE); /* We are using new features */ m_Tab.SetVersion(SFTTABS_6_5); index = m_Tab.AddTab(_T("The First One")); m_Tab.SetToolTip(index, _T("Demonstrates tabbing into and out of the tab page")); Tab = Tab0; Tab.graph.item.hBitmap = (HBITMAP) m_SampleBitmap.m_hObject; m_Tab.SetTabInfo(index, &Tab); m_Tab.SetTabDialog(index, new CPage1(this)); /* tab page */ ... additional tab initialization ... index = m_Tab.AddTab(_T("Si&xth")); m_Tab.SetToolTip(index, _T("A page with nested tab controls and pages")); m_Tab.SetTabInfo(index, &Tab5); m_Tab.SetTabDialog(index, new CPage6(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(0, &m_Tab, NULL); return FALSE; // if this is a dialog's OnInitDialog member function }
See Also C/C++ API | C++ Classes | Notifications