The TB_COMMANDTOINDEX message retrieves the zero-based index for the button associated with the specified command identifier.
TB_COMMANDTOINDEX
wParam = (WPARAM) idButton;
lParam = 0;
Parameters
idButton
Command identifier associated with the button.
Return Values
Returns the zero-based index for the button.