Re: WM_CTLCOLORSTATIC on Vista Aero

Tech-Archive recommends: Fix windows errors by optimizing your registry



This exact same question was also asked in the
microsoft.public.platformsdk.ui newsgroup approximately three hours later.

"Hery Fish" <yh@xxxxxxxxxxxxxx> wrote in message
news:ef9z3XFNIHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
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

  • Re: WM_CTLCOLORSTATIC on Vista Aero
    ... dialgbox to be transparent, I processed the WM_CTLCOLORSTATIC with the ... But, if the Aero is turned on, strange thing happens. ... The static control turns into a black block. ...
    (microsoft.public.win32.programmer.ui)
  • Re: WM_CTLCOLORSTATIC on Vista Aero
    ... I am just wondering whether that is a bug of Vista Aero. ... If you feel you must post the same question in multiple places, ... The static control turns into a black block. ...
    (microsoft.public.win32.programmer.ui)
  • RE: Transparent ActiveX
    ... Using Vista OS? ... Turn off Aero. ... In my case my form would not go transparent until I turned off Aero then it ... Even if I make the backstyle transparent, ...
    (microsoft.public.vb.general.discussion)
  • Re: Need Help with Vista Sidebar
    ... it's automatically transparent so long as you have 'Aero' enabled. ... eg the 'enable transparency option' ...
    (microsoft.public.windows.vista.general)