我需要执行哪些步骤才能在我的扩展工具栏中使用 Visual Studio 的一些内置图标(例如打开、保存、运行、中断图标)?
我曾尝试在我的 VSCT 文件中使用常量,cmdidSave
例如stdidcmd.h
:
<Button guid="guidBBTWindowPackageCmdSet" id="cmdidMyButton1" priority="0x0101" type="Button">
<Parent guid="guidBBTWindowPackageCmdSet" id="ToolbarGroupID"/>
<Icon guid="CMDSETID_StandardCommandSet14" id="cmdidSave" />
<Strings>
<CommandName>cmdidMyCommand1</CommandName>
<ButtonText>Load File</ButtonText>
</Strings>
</Button>
但它不显示图标。相反,它开始以文本样式显示按钮(文本标题而不是图像)。
另一方面,如果我使用“图像剥离方法”(如在默认扩展模板中所做的那样),它工作得很好,但这不是我想要做的。