Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

AllowDestroy

Determines whether a page should be destroyed when it is no longer visible because the associated tab is no longer the currently active tab.

C++

virtual BOOL CSftTabsPage::AllowDestroy();

Returns

If TRUE is returned, the page will be destroyed, otherwise the page is disabled and hidden.

Comments

The AllowDestroy function determines whether a page should be destroyed when it is no longer visible because the associated tab is no longer the currently active tab.

The default implementation of this member function returns FALSE after performing automatic data validation and exchange for the tabbed dialog.

If FALSE is returned, a page and all its associated controls will not be destroyed which can cause considerable Windows resources to be allocated to these pages, however, the data stored in these controls will remain intact and can be accessed until the entire tabbed dialog is finally destroyed. It is up to the developer to weigh the benefits of data persistence against additional resource usage. Switching between tabs is also faster if pages aren't destroyed immediately because the pages don't have to be recreated from the dialog resources every time they become active.

Example

This example causes a page to be destroyed when the page is no longer the active page:

BOOL CSubPg6::AllowDestroy() // Allow window to be destroyed
{
    return TRUE;
}

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


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