Hide

SftTabs/DLL 6.5 - Tab Control

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.

Examples

C

    LRESULT lResult;

    switch (msg) {
    case WM_INITDIALOG:
        SetWindowText(GetDlgItem(hwndDlg, IDC_P1_EDIT1), TEXT("Click another tab"));
        SendMessage(GetDlgItem(hwndDlg, IDC_P1_CHECK1), BM_SETCHECK, 1, 0);

        // initialize page
        SftTabs_SetPageActive(hwndDlg, (HWND) lParam, NULL);
        return !SftTabs_IsRegisteredDialog(GetParent(hwndDlg));
    }

    if (SftTabs_HandleDialogMessage(hwndDlg, msg, wParam, lParam))
        return TRUE;
    if (SftTabs_TransparentControls(hwndDlg, NULL, &msg, &wParam, &lParam, &lResult, 0, 0))
        return (BOOL) lResult;

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


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