I usually create a temp bitmap, paint the background with the current
scheme's dialog background color, then paint an icon on top of it.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Rog" wrote in message
...
Thanks Dmitry, that then supports what I saw when I tried to the use mask
on the Button and get an exception.
Do you know how I can get a transparent image onto the CommandBarButton
using PasteFace then. I used magenta and green as the background, but it
does not work. I am using C#.
Thanks,
Rog
Dmitry Streblechenko wrote:
If you are using the Word editor (default in Outlook 2003), you cannot
set the image using Picture and Mask properties from a COM addin since
IPicture interface cannot be marshalled across the process boundaries
(Word inspectors run in the windword.exe process space), so you must use
the PasteFace method.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Rog" wrote in message
...
Thanks Ken, so the mask is supported even on the inspector for Outlook
2003? I know it works for the Explorer buttons.
Thanks
Ken Slovak - [MVP - Outlook] wrote:
Mask is supported for Outlook 2002 and later. It's only for Outlook
2000 that you need to use a workaround. Are you needing to support
Outlook 2000?
The trick with Outlook 2000 is to use one color as a mask color, say
magenta. That color can only be used where you want masking. Then you
do some fancy stuff with the Win32 API and separate the mask and image
and pop them onto the clipboard and use PasteFace to add the button
image.
See http://www.daveswebsite.com/articles.../default.shtml for a
C++ example and KB288771 for a VB example. Offhand I'm not familiar
with any C# examples but there may be some out there if you Google for
"PasteFace".