DrawThemeText always draws black text

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



The DrawThemeText documentation says:
"Draws text using the color and font defined by the visual style."

So I would expect a caption text in the default Windows XP blue theme
to be white with black shadow.
But it is black with black shadow.
If I use MXCS_INACTIVE the shadow correctly disappears but the text is
still black (not white (grey)).
The font, however, seems to be OK.

DrawThemeBackground (hTheme, hDC, WP_MAXCAPTION, MXCS_ACTIVE, &r,
NULL);
DrawThemeText (hTheme, hDC, WP_MAXCAPTION, MXCS_ACTIVE, L"My
Caption", -1, DT_VCENTER | DT_SINGLELINE | DT_LEFT | DT_NOPREFIX, 0,
&r);

I have tried SetTextColor with no luck.
/Lars

.



Relevant Pages

  • Re: DrawThemeText always draws black text
    ... But it is black with black shadow. ... The font, however, seems to be OK. ... DrawThemeBackground (hTheme, hDC, WP_MAXCAPTION, MXCS_ACTIVE, &r, ...
    (microsoft.public.win32.programmer.ui)
  • Re: DrawThemeText always draws black text
    ... But it is black with black shadow. ... The font, however, seems to be OK. ... GetThemeColor(hTheme, PartId, StateId, TMT_TEXTSHADOWCOLOR, &Color); ...
    (microsoft.public.win32.programmer.ui)
  • Re: Themes
    ... it sounds like you don't have the themed font selected into the DC ... > but I was getting flickering, so I double buffered the drawing. ... > DrawThemeText and pass the dc for the back buffer, ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Themes
    ... it sounds like you don't have the themed font selected into the DC ... >> but I was getting flickering, so I double buffered the drawing. ... >> DrawThemeText and pass the dc for the back buffer, ...
    (microsoft.public.win32.programmer.gdi)
  • Re: DrawThemeText always draws black text
    ... "larschassing" wrote in message ... But it is black with black shadow. ... If I use MXCS_INACTIVE the shadow correctly disappears but the text is ... The font seems to be OK. ...
    (microsoft.public.win32.programmer.gdi)