I'm writing an addin for Outlook in C++. I'd like to specify an icon to be
displayed on the toolbar button. How is this done?
Microsoft.Office.Core.CommandBarControl does not appear to have a property
to set the icon.
Thanks much,
-Eric
I was able to use the "PasteFace" method against a CommandBarButton to get
this to work.
Feels like a hack not to have a method that takes a HBITMAP directly and
instead rely on the system's clipboard to pass the image to a button...
-Eric
> I'm writing an addin for Outlook in C++. I'd like to specify an icon to be
> displayed on the toolbar button. How is this done?
[quoted text clipped - 4 lines]
> Thanks much,
> -Eric
Dmitry Streblechenko - 28 Dec 2003 17:42 GMT
In Outlook versions prior to 2002, copy the bitmap to the clipboard, then
call CommandBarButton.PasteFace.
In Outlook 2002 and up, use CommandBarButton.Picture and
CommandBarButton.Mask properties.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
> I was able to use the "PasteFace" method against a CommandBarButton to get
> this to work.
[quoted text clipped - 12 lines]
> > Thanks much,
> > -Eric