Skip to main content
Participant
June 21, 2016
Question

Plugin ToolBarBottun Not Appearing

  • June 21, 2016
  • 1 reply
  • 572 views

This code runs without throwing exceptions, but the button does not appear in Acrobat DC Pro.

However, if I go into the Customize Quick Tools menu, I can get it to appear by adding it from the File category.

// Create our Toolbar Button
AVIcon icon = (AVCursor)LoadBitmap(gHINSTANCE, MAKEINTRESOURCE(IDB_RAPIDBITMAP));
AVToolButton MyButton = AVToolButtonNew(ASAtomFromString("SPRP:RapidButton"), icon, FALSE, FALSE);
AVToolButtonSetHelpText(MyButton, "Rapid Bookmarks");
AVToolButtonSetExternal(MyButton, TOOLBUTTON_EXTERNAL | TOOLBUTTON_INTERNAL);

AVToolButtonSetExecuteProc(MyButton, ASCallbackCreateProto(AVExecuteProc, MyPluginCommand), NULL);
AVToolButtonSetComputeEnabledProc(MyButton,
  ASCallbackCreateProto(AVComputeEnabledProc, MyPluginIsEnabled), (void *)pdPermEdit);

// Retrieve the File Tool Bar
const char * toolbarName = "File";
AVToolBar ToolBar = AVAppGetToolBarByName(toolbarName);

// Attach the Button
AVToolBarAddButton(ToolBar, MyButton, FALSE, NULL);
AVToolBarUpdateButtonStates(NULL);

return true;

This topic has been closed for replies.

1 reply

lrosenth
Adobe Employee
Adobe Employee
June 21, 2016

Yes, that is correct.

All toolbars are under the user’s control for contents – a plugin cannot automatically add anything. This is also true for the RHP (Right Hand Panel), which is populated by the Tools that the user has selected from the Tools Center.

You may wish to create your own custom toolbar so that it appears in the Tools Center with your own name and icon.

On another note, I notice that the developer prefix you are using (SPRP) is NOT registered with Adobe. Please file a registration when you can