Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Tue, 12 Jul 2005 17:16:02 -0700,    group: microsoft.public.win32.programmer.ui        back       


XP theme causes toolbar to have black background   
I'm trying to create a tool band for internet explorer. The tool band has a 
transparent toolbar control. The toolbar renders correctly under the standard 
windows theme, but it does not render correctly under the XP theme. Its 
background is black instead of being the same background as its parent's.

I tried a lot of different things to fix this problem. I specified the 
TBSTYLE_CUSTOMERASE flag to the toolbar and implemented my own erase routine. 
The routine calls the DrawThemeParentBackground function to set the 
background of the toolbar to be the same as its parent's. However, for some 
unknown reason, the call to the function fails. The function returns one 
instead of zero.

I tried the same thing again by subclassing the toolbar control to specify 
my own handler to the WM_ERASEBKGND message. But again 
DrawThemeParentBackground returned one.

I also used GDI+ to draw a transparent background by specifying an alpha 
blend value for 100% transparency. This did not work either.

Does someone know how to eliminate the black background and replace it with 
a transparent one?
date: Tue, 12 Jul 2005 17:16:02 -0700   author:   Eyor Alemayehu Eyor

Re: XP theme causes toolbar to have black background   
"Eyor Alemayehu" <Eyor Alemayehu@discussions.microsoft.com> wrote in
message news:EFF5284F-B894-40E0-A811-F416E8207A44@microsoft.com
> I'm trying to create a tool band for internet explorer. The tool band
> has a transparent toolbar control. The toolbar renders correctly
> under the standard windows theme, but it does not render correctly
> under the XP theme. Its background is black instead of being the same
> background as its parent's.
>
> I tried a lot of different things to fix this problem. I specified the
> TBSTYLE_CUSTOMERASE flag to the toolbar and implemented my own erase
> routine. The routine calls the DrawThemeParentBackground function to
> set the background of the toolbar to be the same as its parent's.
> However, for some unknown reason, the call to the function fails. The
> function returns one instead of zero.
>
> I tried the same thing again by subclassing the toolbar control to
> specify my own handler to the WM_ERASEBKGND message. But again
> DrawThemeParentBackground returned one.
>
> I also used GDI+ to draw a transparent background by specifying an
> alpha blend value for 100% transparency. This did not work either.
>
> Does someone know how to eliminate the black background and replace
> it with a transparent one?

I am only guessing here, but something similar came up in a post a few 
months back. I suspect that the problem is precisely that the toolbar is 
transparent. In that earlier post, a transparent toolbar had a black 
background if and only if XP themes were used. This was in spite of the fact 
that the parent was not black elsewhere. I therefore can only suggest 
removing the transparency.

-- 
John Carson
date: Wed, 13 Jul 2005 14:26:02 +1000   author:   John Carson

Re: XP theme causes toolbar to have black background   
John,

Matter of fact, I came across the post you are talking about, and removed 
the transparency of the toolbar. This indeed removes the black background, 
and substitutes it with a solid background. However, the solid background of 
the toolbar does not blend with the gradient background of its parent. The 
background of the parent container, which is internet explorer's toolbar 
section, is a gradient background which gets darker as you go from the left 
end to the right.

 

"John Carson" wrote:

> I am only guessing here, but something similar came up in a post a few 
> months back. I suspect that the problem is precisely that the toolbar is 
> transparent. In that earlier post, a transparent toolbar had a black 
> background if and only if XP themes were used. This was in spite of the fact 
> that the parent was not black elsewhere. I therefore can only suggest 
> removing the transparency.
> 
> -- 
> John Carson 
> 
>
date: Wed, 13 Jul 2005 22:45:04 -0700   author:   Eyor Alemayehu

Re: XP theme causes toolbar to have black background   
"Eyor Alemayehu"  wrote in
message news:D14359B5-B808-4D5A-AAA9-F141073EEFE2@microsoft.com
> John,
>
> Matter of fact, I came across the post you are talking about, and
> removed the transparency of the toolbar. This indeed removes the
> black background, and substitutes it with a solid background.
> However, the solid background of the toolbar does not blend with the
> gradient background of its parent. The background of the parent
> container, which is internet explorer's toolbar section, is a
> gradient background which gets darker as you go from the left end to
> the right.

The gradient effect is something that is associated with the rebar control. 
I can get that effect with a rebar in my own application without trying 
(transparency works fine), but I don't know what additional complications 
may be involved when modifying the Internet Explorer toolbar since I have 
never done that. Sorry.

-- 
John Carson
date: Thu, 14 Jul 2005 19:35:48 +1000   author:   John Carson

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us