Determines whether the system can restore a toolbar to its original state after customization.

virtual BOOL CanBeRestored() const;

Return Value

TRUE if the toolbar can be restored from the application resources; otherwise FALSE.


The framework calls this method to determine whether a toolbar can be returned to its original state after customization. The original state is loaded from the application resources.

If CanBeRestored returns TRUE, the Toolbars page of the customization dialog box enables the Reset button for the selected toolbar.

The default implementation returns TRUE if the original resource ID of the toolbar when it was loaded is non-zero. Usually, only user-defined toolbars cannot be restored.

You can override the CanBeRestored method to customize this behavior in derived classes.


Header: afxtoolbar.h

See Also


CMFCToolBar Class

Hierarchy Chart