Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

custom outlook toolbar button icon looks bad

1 view
Skip to first unread message

mister E

unread,
Mar 28, 2002, 8:53:32 PM3/28/02
to
Hi,

I am adding a custom button to the Outlook toolbar with a 256-color icon
(specified in a resource file). In Outlook 2000, the icon appears with a
square dark gray background (just surrounding the icon), that's a darker
shade than the Windows default gray toobar color, making it noticably
unpleasant.
In Outlook XP it looks even worse, and when you do a mouse-over on it, it
turns into a square of greenish-brown pixel goop, totally unrecognizable.

Is there any workaround to this or am I doing something wrong in the way I
place the icon?

Thanks.


Ken Slovak - [MVP - Outlook]

unread,
Mar 29, 2002, 9:10:53 AM3/29/02
to
You need an icon with a transparent background.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


"mister E" <ew...@hotmail.com> wrote in message
news:uoHNaRs1BHA.2560@tkmsftngp07...

nick

unread,
Apr 2, 2002, 9:42:59 AM4/2/02
to
I found a great program from cronosoft that updates older programs to appear
with XP themes and it gives outlook a great new look !

You need XP for it to work

http://cronosoft.com/download/xp_skins/index.htm

"mister E" <ew...@hotmail.com> wrote in message
news:uoHNaRs1BHA.2560@tkmsftngp07...

mister E

unread,
Apr 4, 2002, 7:31:58 PM4/4/02
to
I am using a bitmap and adding it to the toolbar in the
IExchExtCommands::InstallCommands function.
Is there a way to add transparency to the bitmap?
If not, how do I add the toobar icon using an icon resource instead of a
bitmap?


"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message
news:#D7Y$xy1BHA.1628@tkmsftngp03...

Ken Slovak - [MVP - Outlook]

unread,
Apr 5, 2002, 8:32:25 AM4/5/02
to
The process is pretty complicated and involves using a Mask. It's also
different in Outlook 2000 and Outlook 2002. Take a look at these KB
articles for more information about setting up transparent backgrounds
for icon images: Q286460 and Q288771.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm

"mister E" <ew...@hotmail.com> wrote in message

news:#XoKdkD3BHA.2328@tkmsftngp02...

mister E

unread,
Apr 6, 2002, 3:02:42 PM4/6/02
to
Is there no alternative? I am not sure how to convert the VB code here to
work as C++ code in the InstallCommands function.... is there another way to
add buttons to the Outlook toolbar for my COM add-in?

"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message

news:usg0jqK3BHA.1264@tkmsftngp02...

Ken Slovak - [MVP - Outlook]

unread,
Apr 8, 2002, 8:23:23 AM4/8/02
to
AFAIK that's the only way. I have no idea about converting the VB code
to C++, I don't use C++ at all.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm

"mister E" <ew...@hotmail.com> wrote in message

news:uhfuTXa3BHA.1580@tkmsftngp04...

Levi Wolfe

unread,
Apr 17, 2002, 3:44:46 PM4/17/02
to
Believe it or not, there is an easier way of adding a transparent
bitmap to the Outlook toolbar. The following code works well (error
checks removed for simplicity). I really wish there was a way to do
this without destorying the clipboard that worked in ALL versions of
Outlook.

COLORMAP cm;
cm.from = RGB( 192, 192, 192 ); // color to make 'transparent'
cm.to = GetSysColor( COLOR_3DFACE ); // get windows background color
hmem = CreateMappedBitmap( g_hInstDll, resourceId, 0, &cm, 1 );
OpenClipboard(NULL);
SetClipboardData( CF_BITMAP, hmem );
CloseClipboard();
button.Call("PasteFace"); // put bitmap on button

"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message news:<usg0jqK3BHA.1264@tkmsftngp02>...


> The process is pretty complicated and involves using a Mask. It's also
> different in Outlook 2000 and Outlook 2002. Take a look at these KB
> articles for more information about setting up transparent backgrounds
> for icon images: Q286460 and Q288771.
>
>

Ken Slovak - [MVP - Outlook]

unread,
Apr 18, 2002, 8:47:28 AM4/18/02
to
Thanks for that.

You don't have to destroy existing clipboard data at all. Just save it
before your procedure and restore it afterwards. This is an example
using VB code:

Private lngFormat As Long
Private varClip As Variant

Public Sub GetClipboard()
On Error Resume Next
If Clipboard.GetFormat(vbCFRTF) Then
varClip = Clipboard.GetText(vbCFRTF)
lngFormat = vbCFRTF
ElseIf Clipboard.GetFormat(vbCFText) Then
varClip = Clipboard.GetText(vbCFText)
lngFormat = vbCFText
ElseIf Clipboard.GetFormat(vbCFBitmap) Then
varClip = Clipboard.GetData(vbCFBitmap)
lngFormat = vbCFBitmap
ElseIf Clipboard.GetFormat(vbCFDIB) Then
varClip = Clipboard.GetData(vbCFDIB)
lngFormat = vbCFDIB
ElseIf Clipboard.GetFormat(vbCFEMetafile) Then
varClip = Clipboard.GetData(vbCFEMetafile)
lngFormat = vbCFEMetafile
ElseIf Clipboard.GetFormat(vbCFFiles) Then
varClip = Clipboard.GetData(vbCFFiles)
lngFormat = vbCFFiles
ElseIf Clipboard.GetFormat(vbCFLink) Then
varClip = Clipboard.GetData(vbCFLink)
lngFormat = vbCFLink
ElseIf Clipboard.GetFormat(vbCFMetafile) Then
varClip = Clipboard.GetData(vbCFMetafile)
lngFormat = vbCFMetafile
ElseIf Clipboard.GetFormat(vbCFPalette) Then
varClip = Clipboard.GetData(vbCFPalette)
lngFormat = vbCFPalette
Else
varClip = Nothing
lngFormat = 0
End If
End Sub

Public Sub RestoreClipboard()
On Error Resume Next
If (lngFormat) Then
Select Case lngFormat
Case vbCFText
Clipboard.SetText varClip, vbCFText
Case vbCFRTF
Clipboard.SetText varClip, vbCFRTF
Case vbCFBitmap
Clipboard.SetData varClip, vbCFBitmap
Case vbCFDIB
Clipboard.SetData varClip, vbCFDIB
Case vbCFEMetafile
Clipboard.SetData varClip, vbCFEMetafile
Case vbCFFiles
Clipboard.SetData varClip, vbCFFiles
Case vbCFLink
Clipboard.SetData varClip, vbCFLink
Case vbCFMetafile
Clipboard.SetData varClip, vbCFMetafile
Case vbCFPalette
Clipboard.SetData varClip, vbCFPalette
End Select
End If
End Sub

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm

"Levi Wolfe" <le...@omniva.com> wrote in message
news:8773f3eb.0204...@posting.google.com...

0 new messages