ButtonMenuTool 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.

//Makes the first rubber stamp tool draw a rectangle.
void SetToolToRect (ILEADRasterAnnToolBar * pAnnToolbar)
{
   int i;
   for(i=0; i<pAnnToolbar->GetButtonCount(); i++)
   {
      // is this the button with the rubber stamps ?
      if(pAnnToolbar->GetButtonToolCount(i) > 1)
         pAnnToolbar->PutButtonMenuTool(i, 0, ANN_TOOL_RECT);
   }
}