Hide

SftTabs/DLL 6.0 - Tab Control for C/C++

Display
Print

SetPageActive

Notifies a tab control that the page attached to the currently active tab has been activated.

C

void WINAPI SftTabs_SetPageActive(HWND hwndSubDlg, HWND hwndTab, LPVOID lpTabData);

Parameters

hwndSubDlg

The window handle of the page attached to the currently active tab. This value is saved in the hwndSubDlg member of the SFTTABS_CONTROL structure.

hwndTab

The window handle of the tab control.

lpTabData

An application defined value. This value is saved in the lpTabData member of the SFTTABS_CONTROL structure. For the C++ tabbed dialog and window implementation, this is the page object, otherwise this parameter should be NULL.

Comments

The SetPageActive function notifies a tab control that the page attached to the currently active tab has been activated.

The page is automatically resized to fit inside the tab control's client area (or a supplied frame window, see SFTTABS_CONTROL), certain incompatible window styles are changed and the page is made visible. The call to SftTabs_SetPageActive should always be performed in the page's WM_INITDIALOG message handler or the SFTTABS_TABCALLBACK function. For C++, the call is automatic when using the supplied classes.

Example

This C example shows a page (subdialog) about to become active:

switch (msg) {
    case WM_INITDIALOG: {
        HWND hwndTab = (HWND) lParam;// get the associated tab control
        // initialize page
        SftTabs_SetPageActive(hwndDlg, (HWND) lParam, NULL);
        return FALSE;
    }
}

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2025 Softel vdm, Inc.