Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

TerminateTabControl

Terminates a tab control and deactivates all pages.

C++

protected:
    void CSftTabsWindowSheet::TerminateTabControl(CWnd* pWnd, CSftTabs* pTabCtl);

Parameters

pWnd

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

pTabCtl

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

Comments

The TerminateTabControl function terminates a tab control and deactivates all pages.

A tabbed window's tab control has to be terminated, which deactivates and destroys all pages attached to the tab control. This is typically done in the OnDestroy member function of the tabbed window.

When a tabbed window is destroyed, all attached CSftTabsWindowPage objects are automatically destroyed. However, any dynamically allocated CSftTabsWindowPage derived objects must be deleted (using the C++ delete operator) by the application.

Example

This example terminates the tab control of a tabbed window:

void CSampleView::OnDestroy()
{
    // Remove all pages from the tab control
    TerminateTabControl(this, &m_Tab);

    // Unregister, or the window properties used won't be removed
    SftTabs_UnregisterWindow(m_hWnd);
    CView::OnDestroy();
}

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


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