How to set Task Dialog main instruction color? |
Post Reply |
Author | |
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
Posted: 08 July 2008 at 9:32am |
On a skinned dark background, it's not very readable:
None of the colors in my skin project seem to match (though because of cleartype I can't be positive) -- is there a property I need to add? |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
The color of the main instruction appears to be hardcoded in CXTPTaskDialogClient::RefreshColors():
m_crMainText = m_bThemeReady ? RGB(0x00, 0x33, 0x99) : m_crContextText; Shouldn't this use a skinnable color? It is unreadable on a dark background! |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
Here's my workaround for now, by overriding CXTPTaskDialog::DrawMainInstruction() . It's rather arbitrary and ugly, but it is a temporary solution sufficient for my current needs. (Overriding RefreshColors() was an option as well, but it's not virtual so more likely to cause problems.)
Please let me know if and when there will be a way to handle this color properly from within the skin. class CSWTaskDialog : public CXTPTaskDialog { public: CSWTaskDialog(CWnd* pWndParent = NULL) : CXTPTaskDialog(pWndParent) {}; protected: virtual void DrawMainInstruction(CDC* pDC) { if (m_crMainText == RGB(0x00, 0x33, 0x99) && GetRValue(m_crContext) + GetGValue(m_crContext) + GetBValue(m_crContext) < 360) m_crMainText = RGB(0x66, 0x99, 0xff); CXTPTaskDialog::DrawMainInstruction(pDC); }; }; |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Thanks, we fixed it.
Here code we added
if (!XTPColorManager()->LongColor(m_crMainText, crWindow, 1, 50))
m_crMainText = m_crContextText; |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |