Share via


CToolBarCtrl::CommandToIndex

Retrieves the zero-based index for the button associated with the specified command identifier.

UINT CommandToIndex( 
   UINT nID  
) const;

Parameters

  • nID
    Command ID whose button index you want to find.

Return Value

The zero-based index for the button associated with the command ID.

Requirements

Header: afxcmn.h

See Also

Reference

CToolBarCtrl Overview

Hierarchy Chart

CToolBarCtrl::SetCmdID

CToolBarCtrl::GetButton

CToolBarCtrl::AddButtons

CToolBarCtrl::InsertButton