Toolbars and Menus
I must be some special kinda stoopid. It just *cant* be this hard to add a custom bitmap to a toolbar, right? Can it?
From the AddNamedCommand docs:
MSOButton
Required. Indicates whether the named command’s button picture is an Office picture. True = button.
Bitmap
Optional. The ID of a bitmap to display on the button.
And the code:
pCommands->AddNamedCommand(m_pAddInInstance, CComBSTR(VE_CMD_CONFIG_SHORT), CComBSTR(VE_CMD_CONFIG_TEXT), CComBSTR(VE_CMD_CONFIG_TOOLTIP), VARIANT_FALSE, IDB_VISEMACS_CONFIGURE_16x16, NULL, EnvDTE::vsCommandStatusSupported+EnvDTE::vsCommandStatusEnabled, &pCreatedCommand);
I put the resource in a resource-only dll, stuck it in resources/1033 and ran the debugger. Looked at my toolbar and…and…sigh.
So where’s my bitmap? Anyone?
Filed under: News
