Share via


CToolBar::CommandToIndex

This member function returns the index of the first toolbar button, starting at position 0, whose command ID matches nIDFind.

int CommandToIndex(
   UINT nIDFind 
) const;

Parameters

  • nIDFind
    Command ID of a toolbar button.

Return Value

The index of the button, or –1 if no button has the given command ID.

Requirements

Header: afxext.h

See Also

Reference

CToolBar Class

Hierarchy Chart

CToolBar::GetItemID

Other Resources

CToolBar Members