XLL+ Class Library

CXlToolbar::EnableTool

Sets the enabled state of a tool button

[C++]
static BOOL EnableTool(
   const char* pszToolbarName,
   short int nPosition,
   bool bEnabled
);
static BOOL EnableTool(
   short int nToolbarID,
   short int nPosition,
   bool bEnabled
);

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.

nPosition

The index of the tool within the toolbar.

bEnabled

Sets whether the tool is enabled (true) or disabled (false).

nToolbarID

The unique identifier of the toolbar.

Return value

Returns TRUE if the tool's state was successfully set, and FALSE if the function failed.

Requirements

Header: xltoolbar.h

See Also

CXlToolbar Class | CXlToolbar Methods