I have added a new command by implementing a package. I want this command to appear on the "Build" menu, and in the "Build" toolbar, but only when the project factory for my new project type has context. I am able to do this succesfully on the "Build" menu, but my new command is only greyed out, not absent from the "Build" toolbar, when it should be. My .ctc file looks as follows:
CMDS_SECTION guidBuildToolbarsPkg
MENUS_BEGIN // NewMenu Relative to Group Priority Type Name Text MENUS_END
NEWGROUPS_BEGIN // NewGroup Parent Group Priority guidBuildToolbarsCmdSet:MyBuildGroup, guidSHLMainMenu:IDM_VS_MENU_BUILD, 0x0600; NEWGROUPS_END
BUTTONS_BEGIN // Command Parent Group Priority Image Type Visibility guidBuildToolbarsCmdSet:cmdidDriver, guidBuildToolbarsCmdSet:MyBuildGroup, 0x0100, guidBuildToolbarsCmdSet:bmpPic1, BUTTON, DEFAULTINVISIBLE | DYNAMICVISIBILITY, "Driver"; BUTTONS_END
CMDPLACEMENT_SECTION // Command Group Priority guidBuildToolbarsCmdSet:cmdidDriver, guidSHLMainMenu:IDG_VS_BUILDBAR, 0x0000; CMDPLACEMENT_END
VISIBILITY_SECTION // Command GUID when visible guidBuildToolbarsCmdSet:cmdidDriver, guidDesignProjecType; VISIBILITY_END
It seems that since I defined the button for cmdidDriver to be DEFAULTINVISIBLE | DYNAMICVISIBILITY, and I have set up my VISIBILITY_SECTION as I need, that the two instances of the "Driver" button should behave the same, but they don't. Any pointers?