Sets the specified button to be visible or hidden.
#include "LtTLB.h"
L_LTTLB_API L_INT L_TBSetButtonVisible(pToolbar, uButtonID, fVisible )
Pointer to a toolbar handle.
Identifier of the button to set.
Flag that indicates whether to make the specified button visible or hidden. Possible values are:
| Value | Meaning |
|---|---|
| TRUE | Make the specified button visible. |
| FALSE | Make the specified button hidden. |
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes |
To determine whether a button is visible or hidden, call L_TBIsButtonVisible.
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.
L_INT TBSetButtonVisibleExample( pTOOLBARHANDLE pLeadToolbar,L_UINT uButtonID ){L_INT nRet;nRet = L_TBIsValid ( pLeadToolbar );/* check the validity of the toolbar handle */if (SUCCESS == nRet ){L_BOOL fVisible ;/* Get the state of the toolbar button visibility */nRet = L_TBIsButtonVisible ( pLeadToolbar, uButtonID, &fVisible ) ;if(nRet != SUCCESS)return nRet;if ( fVisible ){nRet = L_TBSetButtonVisible ( pLeadToolbar, uButtonID, FALSE ) ; /* Hid the button */if(nRet != SUCCESS)return nRet;}else{nRet = L_TBSetButtonVisible ( pLeadToolbar, uButtonID, TRUE ) ; /* Show the button */if(nRet != SUCCESS)return nRet;}return SUCCESS ;}elsereturn nRet ;}