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
The parent window of a tab control calls the SftTabs_DeactivatePage function to signal that the current page is no longer the active page.
C
BOOL WINAPI SftTabs_DeactivatePage(HWND hwndParent, HWND hwndCtl);
hwndParent
The window handle of the tab control's parent window.
hwndCtl
The window handle of the tab control.
The return value is TRUE if the current page was deactivated, otherwise the return value is FALSE.
The DeactivatePage function is called by the parent window of a tab control to signal that the current page is no longer the active page.
SftTabs_DeactivatePage is only used in the C implementation of tabbed dialogs and tabbed windows.
The SftTabs_DeactivatePage function sends a WM_QUERYENDSESSION and SftTabs_GetEndPageMessage messages to the currently active tab and its associated dialog or window procedure to determine if the page can be deactivated. It also causes the tab callback routine SFTTABS_TABCALLBACK responsible for the current tab to be called to destroy the page.
This C example shows a typical tabbed dialog WM_COMMAND message handler:
case WM_COMMAND: { HWND hwndCtl = (HWND) lParam; int id = LOWORD(wParam); int code = HIWORD(wParam); if (hwndCtl) { switch (id) { case IDC_TAB: switch (code) { case SFTTABSN_SWITCHING:// we're about to switch away from // the current page. If you need to know what the new // page will be use SftTabs_GetNextTab(hwndCtl). if (!SftTabs_DeactivatePage(hwndParent, hwndCtl)) // couldn't deactivate current page, so don't switch SendMessage(hwndCtl, WM_CANCELMODE, 0, 0); break; case SFTTABSN_SWITCHED:// we switched to a new page SftTabs_ActivatePage(hwndParent, hwndCtl, NULL, FALSE); break; } break; case IDOK: case IDCANCEL: if (code == BN_CLICKED) SendMessage(hwndParent, WM_COMMAND, id, 0); break; } } else { switch (id) { case IDOK: // The currently active page will be called with a // WM_QUERYENDSESSION/SftTabs_GetEndPageMessage message to determine // whether it can be closed if (SftTabs_ClosePossible(hwndParent, GetDlgItem(hwndParent, IDC_TAB))) EndDialog(hwndParent, TRUE); break; case IDCANCEL: EndDialog(hwndParent, FALSE); break; // The above assumes that this is a modal dialog. If it is a modeless // don't use EndDialog, use DestroyWindow instead. } } break; }
See Also C/C++ API | C++ Classes | Notifications