XLL+ Class Library (7.0)


Creates a new empty toolbar

static BOOL AddToolbar(
   const TCHAR* pszToolbarName
static BOOL AddToolbar(
   const TCHAR* pszToolbarName,
   CXlToolbarState& state



The name of the toolbar, which will appear on the toolbar when it is floating, and also in the Tools/Customize dialog box.

This argument can contain a resource ID string. This will be replaced at run-time by a string loaded from the resource file in the current preferred language, as returned by XllGetStringLanguageID.


A reference to a state object, which will receive the visibility and position of the toolbar if it already exists.

Return Value

Returns TRUE if the toolbar was successfully created, and FALSE if the function failed.


Creates a new named toolbar without tool buttons.

The second variant will destroy any existing toolbar, and store its state information in the state object. This can later be passed to ShowToolbar to restore the toolbar to its original visibility and position.


Header: xltoolbar.h

See Also

CXlToolbar Class | CXlToolbar Methods