|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Offer Har
|
Jan 5, 2007 - 10:44 AM
|
Hi,
I am using g_PaintManager->m_FontBold to get the deafult bold font. when using CExtPaintManagerOffice2007_R3_Obsidian , i assumed it will return me a white bold font, but i get a black bold font.
How can i get a while bold font?
Thanks, Ron.
|
|
Technical Support
|
Jan 5, 2007 - 11:47 AM
|
The g_PaintManager->m_FontBold is just a font. When drawing text you can specify a color using the CDC::SetTextColor() method.
There is a CExtPaintManager::QueryObjectTextColor() method that can be useful if you want the color compatible with the current theme.
|
|
Offer Har
|
Jan 5, 2007 - 3:35 PM
|
I have added this to my code:
m_clrText = PmBridge_GetPM()->QueryObjectTextColor( dcFake, true, false, false, false, (CObject*)this );
And i get -1.
I stepped in, and this is where i got:
COLORREF CExtPaintManager::QueryObjectTextColor( CDC & dc, bool bEnabled, bool bFocused, bool bHovered, bool bPressed, CObject * pHelperSrc, LPARAM lParam // = 0L ) { ASSERT_VALID( this ); dc; bEnabled; bFocused; bHovered; bPressed; pHelperSrc; lParam; return COLORREF(-1L); }
What is the problem? What am i missing?
Thanks, Ron.
|
|
Technical Support
|
Jan 6, 2007 - 5:11 AM
|
Actually the QueryObjectTextColor() method is used only in the paint manager that produces the Obsidian (Black) theme so you need to analyze the returned color. If it is COLORREF(-1L) , you should specify the color yourself: m_clrText =
PmBridge_GetPM()->QueryObjectTextColor(
dcFake,
bEnabled,
false,
false,
false,
(CObject*)this
);
if( m_clrText == COLORREF(-1L) )
m_clrText =
bEnabled
? PmBridge_GetPM()->GetColor( COLOR_WINDOWTEXT )
: PmBridge_GetPM()->GetColor( COLOR_3DSHADOW ); We are sorry for being inaccurate in the previous reply.
|
|
Offer Har
|
Jan 8, 2007 - 6:37 AM
|
|
|