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
Deactivates or destroys a page.
C++
protected: virtual void CSftTabsWindowPage::DeactivatePage(CWnd* pParent, CSftTabs* pTabCtl, BOOL fFinal) = 0;
pParent
The CWnd based object describing the tab control's parent window.
pTabCtl
A pointer to the tab control's CSftTabs based object.
fFinal
TRUE if the page must be destroyed or FALSE if the page can be hidden or destroyed.
The DeactivatePage function deactivates or destroys a page.
The CSftTabsWindowSheet class implementation calls this member function to destroy the window associated with a page or to make the page invisible.
If the page is destroyed, the page must be recreated when the user switches back to this page (see CSftTabsWindowPage::ActivatePage). This does save resources but may cause excessive wait times. It is up to your application to choose the most suitable method.
Not all CWnd derived classes are suitable to be destroyed multiple times while using the same C++ object. Some classes (once constructed) assume that an attached window is only created once, not multiple times as it could happen with SftTabs/DLL. If a class doesn't support multiple creation of its window, you have to use ShowWindow when the user switches away from the tab page (as shown in the example below).
Your CWnd based class must implement DeactivatePage.
This example shows the suggested implementation of the DeactivatePage function:
void CYourPage::DeactivatePage(CWnd* pParent, CSftTabs* pTabCtl, BOOL fFinal) { if (fFinal) { // You must destroy the window, the tabbed window (parent) is going away DestroyWindow(); } else { // Hide the page. If you want, you could use DestroyWindow here too. // In that case you save resources and the window will be recreated // when the user switches back to this page ShowWindow(SW_HIDE); EnableWindow(FALSE); } // clear associated page in tab's control structure SftTabs_SetPageInactive(pTabCtl->m_hWnd); }
See Also C/C++ API | C++ Classes | Notifications