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

Given a command ID retrieves index of toolbar button image.

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.

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