XLL+ Class Library (6.3)

CXlToolbar::ShowToolbar

Sets the display options for a toolbar

static BOOL ShowToolbar(
   const TCHAR* pszToolbarName,
   bool bVisible,
   int nDock = CXlToolbar::DockNone,
   long xPos = LONG_MAX,
   long yPos = LONG_MAX,
   long cWidth = LONG_MAX,
   short int nProtect = 0,
   bool bTooltips = false,
   bool bLargeButtons = false,
   bool bColorButtons = true
);
static BOOL ShowToolbar(
   short int nToolbarID,
   bool bVisible,
   int nDock = CXlToolbar::DockNone,
   long xPos = LONG_MAX,
   long yPos = LONG_MAX,
   long cWidth = LONG_MAX,
   short int nProtect = 0,
   bool bTooltips = false,
   bool bLargeButtons = false,
   bool bColorButtons = true
);
static BOOL ShowToolbar(
   const TCHAR* pszToolbarName,
   CXlToolbarState& state,
   bool bVisible,
   int nDock = CXlToolbar::DockNone,
   long xPos = LONG_MAX,
   long yPos = LONG_MAX,
   long cWidth = LONG_MAX,
   short int nProtect = 0,
   bool bTooltips = false,
   bool bLargeButtons = false,
   bool bColorButtons = true
);
static BOOL ShowToolbar(
   short int nToolbarID,
   CXlToolbarState& state,
   bool bVisible,
   int nDock = CXlToolbar::DockNone,
   long xPos = LONG_MAX,
   long yPos = LONG_MAX,
   long cWidth = LONG_MAX,
   short int nProtect = 0,
   bool bTooltips = false,
   bool bLargeButtons = false,
   bool bColorButtons = true
);

Parameters

pszToolbarName

The name of the toolbar.

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.

bVisible

True if the toolbar should be visible. False if it should not. The user can change this setting via Tools/Customize.

nDock

An integer defining the docking position of the toolbar. This should be a member of the DockTypes enumeration, as listed below.

DockTypes Value Position
DockTop 1 Top
DockLeft 2 Left
DockRight 3 Right
DockBottom 4 Bottom
DockNone 5 Floating

xPos

The x-coordinate of the position of the toolbar. A value of LONG_MAX is ignored, and the application default will be applied.

yPos

The y-coordinate of the position of the toolbar. A value of LONG_MAX is ignored, and the application default will be applied.

cWidth

The preferred width of the toolbar. A value of LONG_MAX is ignored, and the application default will be applied.

nProtect

An integer defining the accessibility of the toolbar.

bTooltips

Sets whether tool-tips are displayed when the mouse is over the toolbar.

bLargeButtons

Sets whether the toolbar is displayed with extra-large buttons.

bColorButtons

Sets whether the toolbar is displayed in color (true) or monochrome (false).

nToolbarID

The unique identifier of the toolbar.

state

A reference to a state object, which should contain the visibility and position of the toolbar the last time it existed. The state object should have been populated by a call to AddToolbar.

Return Value

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

Requirements

Header: xltoolbar.h

See Also

CXlToolbar Class | CXlToolbar Methods