XLL+ Class Library

CXlToolbar::ShowToolbar

Sets the display options for a toolbar

[C++]
static BOOL ShowToolbar(
   const char* 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 char* 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.

DockTypesValuePosition
DockTop1Top
DockLeft2Left
DockRight3Right
DockBottom4Bottom
DockNone5Floating

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