CToolbar.CommandToIndexmethod
Retrieves the zero-based index for the button associated with the specified command identifier.
Syntax
FUNCTION CommandToIndex (BYVAL hToolbar AS HWND, BYVAL idButton AS LONG) AS LONG
Parameters
| Name | Description | |
|---|---|---|
hToolbar | Handle to the toolbar control. | |
idButton | Command identifier associated with the button. |
Return value
Returns the zero-based index for the button or -1 if the specified command identifier is invalid.
Description
Retrieves the zero-based index for the button associated with the specified command identifier.
Reference
- Include file
CToolbar.inc - Defined in AfxNova/CToolbar.inc:371
- Documented in Windows/WIndows Controls/CToolbar Class.md
- Topic: CToolbar Class