BCGControlBar Pro for MFC
UINT CBCGPToolBar::GetItemID ( int  nIndex) const

Given a toolbar button's index retrieves the button's command ID.

Returns
A toolbar button's command ID; it is zero if the button with the specified index does not exist.

Call this member function to retrieve a toolbar button's command ID by the button's index. This index identifies the button in the toolbar's internal list of buttons.

Parameters
nIndexSpecifies the toolbar button's index.