L_TBSetButtonChecked
#include "LtTLB.h"
L_INT EXT_FUNCTION L_TBSetButtonChecked (pToolbar, uButtonID )
pTOOLBARHANDLE pToolbar; |
/* pointer to a toolbar handle */ |
L_UINT uButtonID; |
/* button ID */ |
Selects (checks) the given button in the toolbar.
Parameter |
Description |
pToolbar |
Pointer to a toolbar handle. |
uButtonID |
Identifier of the button to select (check) . |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes |
Comments
Only one button may be selected (checked) at a time.
To determine whether a button is selected (checked), call L_TBGetButtonChecked.
Required DLLs and Libraries
LTTLB
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
See Also
Functions: |
|
Topics: |
Example
/* This example will check the current check button in the toolbar
and then if the checked button is not equal the required button, the required button will be checked */
L_INT CheckButtonTest ( pTOOLBARHANDLE pLeadToolbar, L_UINT uButtonID )
{
if (SUCCESS == L_TBIsValid ( pLeadToolbar ) ) /* check the validity of the toolbar handle */
{
L_INT nCheckedID ;
/* Get the current checked button in the toolbar */
L_TBGetButtonChecked ( pLeadToolbar, &nCheckedID ) ;
if ( nCheckedID != ( L_INT ) uButtonID )
{
/* Check the required button */
L_TBSetButtonChecked ( pLeadToolbar, uButtonID ) ;
}
return SUCCESS ;
}
else
{
return FAILURE ;
}
}