Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

SwitchTab

Switches to the next/previous tab.

C

void SftTabs_SwitchTab(HWND hwndCtl, BOOL fNext);

C++

void CSftTabs::SwitchTab(BOOL fNext);

Parameters

hwndCtl

The window handle of the tab control.

fNext

If TRUE is specified, the next available tab with a higher tab index is made the active tab, otherwise the previous tab (with a lower tab index) is made the active tab.

Comments

The SwitchTab function switches to the next/previous tab.

SwitchTab will skip disabled tabs. If no next/previous tab is available, the function has no effect.

The SetCurrentTab function can be used to make a tab active by using its index.

Examples

C

                        Sft_SetPictureCheckBox(&Tab.TabPicture, fChecked, 16, 16, TRUE);
                        SftTabs_SetTabInfo(m_hwndMainTab, iTab, &Tab); // save the new tab settings
                    }
                 }
                }
                break;

            case IDC_NEXT:
                SftTabs_SwitchTab(m_hwndMainTab, TRUE);
                break;
            case IDC_BACK:
                SftTabs_SwitchTab(m_hwndMainTab, FALSE);
                break;
            case IDOK:
            case IDCANCEL:
                if (code == BN_CLICKED)

C++

        fChecked = !fChecked;
        Sft_SetPictureCheckBox(&Tab.TabPicture, fChecked, 16, 16, TRUE);
        m_Tab.SetTabInfo(iTab, &Tab); // save the new tab settings
    }
}

void CMainDlg::OnBack() 
{
    m_Tab.SwitchTab(FALSE);
}

void CMainDlg::OnNext() 
{
    m_Tab.SwitchTab(TRUE);
}

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


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