Board index » cppbuilder » XP Theme Font Color

XP Theme Font Color


2005-09-22 11:03:29 PM
cppbuilder71
Does any one know how to select a font and/or color into a
theme class for use with DrawThemeText?
~ JD
 
 

Re:XP Theme Font Color

"JD" < XXXX@XXXXX.COM >wrote in message
Quote
Does any one know how to select a font and/or color into a
theme class for use with DrawThemeText?
I'm not a member of CodeGuru so I can't download the code it seems, but
this code might help you, in particular this line:
m_pbtnOk->SetFont(GetFont());
You might be able to see how he handled this.
www.codeguru.com/Cpp/controls/buttonctrl/article.php/c5189/
HTH
Jonathan
 

Re:XP Theme Font Color

"Jonathan Benedicto" < XXXX@XXXXX.COM >wrote:
Quote

[...] in particular this line:

m_pbtnOk->SetFont(GetFont());
That just sets the control's font. I'm trying to find a way to
change the font that a particular theme class will use when it
paint's the control.
To be clear, all theme drawing functions require an HDC but
not all classes will use the font info from that HDC. Now, I
can open one class and draw the background and then open a
different class (one that will use what's provided by the HDC)
to draw the text but some classes are not compatible with
other's (messes up the background when the text is drawn).
I've observed Window's changing the font as described above
but I have no clue how to get to it or even if Windows has
that exposed for me to have at it and I can find nothing on it.
~ JD
 

{smallsort}

Re:XP Theme Font Color

"JD" < XXXX@XXXXX.COM >wrote in message
Quote
I've observed Window's changing the font as described above
but I have no clue how to get to it or even if Windows has
that exposed for me to have at it and I can find nothing on it.
I did notice on MSDN that they have a GetThemeFont function, but no
SetThemeFont. It seems like Ms wants us to use what they decided the font
to be.
However, in .NET2, I can change the font of components. I wonder how they
do it.
Jonathan