XLL+ Class Library (6.3)

CXlToolbar::AssignToTool

Assigns a macro to a tool button

static BOOL AssignToTool(
   const TCHAR* pszToolbarName,
   short int nPosition,
   const TCHAR* pszMacro
);
static BOOL AssignToTool(
   short int nToolbarID,
   short int nPosition,
   const TCHAR* pszMacro
);

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.

pszMacro

The name of the macro function which will be run when the button is pushed.

nToolbarID

The unique identifier of the toolbar.

Return Value

Returns TRUE if the macro was successfully assigned to the tool, and FALSE if the function failed.

Requirements

Header: xltoolbar.h

See Also

CXlToolbar Class | CXlToolbar Methods