ButtonVisible example for C++ 5.0 and later

For more information on declaration and unlocking procedures used in testing this example, refer to Annotation Declaration Information.

//This example toggles the visible state of the button corresponding to iButtonIndex.
//The button index is zero based
void ToggleVisibleState (ILEADRasterAnnToolBar * pAnnToolBar, short iButtonIndex)
{
   VARIANT_BOOL bVisible;
   bVisible = pAnnToolBar->GetButtonVisible(iButtonIndex);
   pAnnToolBar->PutButtonVisible(iButtonIndex, !bVisible);
}