BCGControlBar Pro for MFC
static UINT CImageHash::GetImageOfCommand ( UINT  nID,
BOOL  bUser = false 
)
static

Given a command ID retrieves index of toolbar button image.

Returns
Index of toolbar button image. It is -1 if nID does not specify a valid command ID.

Call this function to retrieve index of toolbar image.

Toolbar images are contained in one large bitmap. The GetImageOfCommand function helps to "convert" toolbar command IDs to the indexes of associated images.

Parameters
nIDSpecifies the command ID.
bUserSpecifies whether to search the collection of user images (TRUE) or standard images (FALSE).