XLL+ Class Library (7.0)

CXlToolbar::SetToolBitmap

Assigns a bitmap to a tool button

static BOOL SetToolBitmap(
   const TCHAR* pszToolbarName,
   short int nPosition,
   const TCHAR* pszBitmapFile
);
static BOOL SetToolBitmap(
   const TCHAR* pszToolbarName,
   short int nPosition,
   WORD idBitmap
);
static BOOL SetToolBitmap(
   const TCHAR* pszToolbarName,
   short int nPosition,
   HBITMAP hBitmap
);
static BOOL SetToolBitmap(
   short int nToolbarID,
   short int nPosition,
   const TCHAR* pszBitmapFile
);
static BOOL SetToolBitmap(
   short int nToolbarID,
   short int nPosition,
   WORD idBitmap
);
static BOOL SetToolBitmap(
   short int nToolbarID,
   short int nPosition,
   HBITMAP hBitmap
);

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.

pszBitmapFile

The full path to a bitmap file.

idBitmap

The resource ID of a bitmap held in the add-ins resource file.

hBitmap

Handle to a bitmap.

nToolbarID

The unique identifier of the toolbar.

Return Value

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

Requirements

Header: xltoolbar.h

See Also

CXlToolbar Class | CXlToolbar Methods