Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

TabSwitched

Handles the SFTTABSN_SWITCHED notification.

C++

protected:
    void CSftTabsWindowSheet::TabSwitched(CWnd* pParent, CSftTabs* pTabCtl);

Parameters

pParent

The CWnd based object describing the tab control's parent window.

pTabCtl

A pointer to the tab control's CSftTabs based object.

Comments

The TabSwitched function handles the SFTTABSN_SWITCHED notification.

A tabbed window must call this function to process the SFTTABSN_SWITCHED notification that is generated by the tab control to switch between pages.

Message map entries must also be added to the tab control's parent window.

Example

This example implements the suggested OnTabSwitched function that calls TabSwitched to switch between pages:

// Add the following definitions to the tab control's parent window
// class CYourSheet
afx_msg void OnTabSwitching();
afx_msg void OnTabSwitched();

// Add the following to the parent window's message map
ON_SFTTABSN_SWITCHING(IDC_TAB, OnTabSwitching)
ON_SFTTABSN_SWITCHED(IDC_TAB, OnTabSwitched)

// Implement the following functions in CYourSheet
void CYourSheet::OnTabSwitching()
{
    TabSwitching(this, &m_Tab);
}

void CYourSheet::OnTabSwitched()
{
    TabSwitched(this, &m_Tab);
}

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


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