Print Page | Close Window

CXTPSkinManagerLegacyApiHook::OnHookGetSysColor()

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=24131
Printed Date: 27 April 2024 at 2:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPSkinManagerLegacyApiHook::OnHookGetSysColor()
Posted By: MaxG
Subject: CXTPSkinManagerLegacyApiHook::OnHookGetSysColor()
Date Posted: 10 February 2021 at 4:03am
Hello!
I believe there's a bug in Toolkit for MFC v19.3.0 in CXTPSkinManagerLegacyApiHook::OnHookGetSysColor():

original:
CXTPSkinManagerMetrics* pMetrics = XTPSkinManager()->GetMetrics();
if (NULL != pMetrics && pSkinManager->IsEnabled())
{
crColor    = pMetrics->GetColor(nIndex);
bDefaultProcessing = (COLORREF_NULL != crColor);
}

expected:
CXTPSkinManagerMetrics* pMetrics = XTPSkinManager()->GetMetrics();
if (NULL != pMetrics && pSkinManager->IsEnabled())
{
crColor    = pMetrics->GetColor(nIndex);
bDefaultProcessing = (COLORREF_NULL == crColor);
}

So there should be == operator when comparing retrieved color to COLORREF_NULL. Otherwise, themed colors are replaced with the system colors.

Thanks!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net