WM_CTLCOLORSTATIC on Vista Aero



I created a transparent dialogbox. To make the static text control in the dialgbox to be transparent, I processed the WM_CTLCOLORSTATIC with the code like this:

case WM_CTLCOLORSTATIC:
{
HDC hdc=(HDC)wParam;

SetBkMode(hdc, TRANSPARENT);
}
return (INT_PTR)GetStockObject(NULL_BRUSH);

This worked very well on Win98, Win2000, WinXP and even on Windows Vista without Aero.

But, if the Aero is turned on, strange thing happens.

The static control turns into a black block. It seems that NULL_BRUSH does not work in its usual way.

Does anybody know how to fix this? I do not want to turn off the Aero by force in my program.

Thanks a lot in advance.

Henry Fish

.



Relevant Pages

  • WM_CTLCOLORSTATIC with NULL_BRUSH has trouble on Vista Aero
    ... I created a transparent dialogbox. ... But, if the Aero is turned on, strange thing happens. ... The static control turns into a black block. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Problem with GDI and Aero
    ... be doing it int he OnPaint handler, which means there is no reason to call ... no sense to have the dialog draw into a child control. ... out why Aero is ... or, actually, choose a static control with the SS_BITMAP style and just do ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Lever placement on shallow drops?
    ... but I'm more comfortable and feel more in control when my hands are on the ... I guess a lot of it depends on what sort of descending. ... ultimate aero. ... so usually aero isn't that important. ...
    (rec.bicycles.tech)
  • Re: Aero and Aqua
    ... what Apple has had for years... ... Aero is not very customizable. ... More customizable than Aqua, sure, ... taking control, ...
    (comp.sys.mac.advocacy)