<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : MFC assertion after skin change (force black text)</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : MFC assertion after skin change (force black text)]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 14 Apr 2026 16:47:06 +0000</pubDate>
  <lastBuildDate>Thu, 11 Feb 2021 15:06:37 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=24132</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[MFC assertion after skin change (force black text) : Hello,This is my first question...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24132&amp;PID=78044&amp;title=mfc-assertion-after-skin-change-force-black-text#78044</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9459">pvdhouten</a><br /><strong>Subject:</strong> 24132<br /><strong>Posted:</strong> 11 February 2021 at 3:06pm<br /><br />Hello,<div><br></div><div>This is my first question posted on this forum.</div><div><br></div><div>I encounter an debug exception in MFC code after I change the skin of my application.</div><div>The application has lots of existing MFC components and I added a ribbon bar and docking pane manager to an MDI MainFrame.</div><div><br></div><div>The call stack leads to MFC code CControlBar::OnCtlColor with comments "force black text on gray background all the time". Inside&nbsp;CWnd::GrayCtlColor exists a verify assertion that fails:</div><div><br></div><div><font face="Courier New, Courier, mono">VERIFY(::GetObject(hbrGray, sizeof(LOGBRUSH), (LPVOID)&amp;logbrush));</font></div><div><br></div><div>The call stack after the skin change:</div><div><br></div><div><div><font face="Courier New, Courier, mono" size="1">CWnd::GrayCtlColor(HDC__ * hDC, HWND__ * hWnd, unsigned int nCtlColor, HBRUSH__ * hbrGray, unsigned long clrText) Line 4356</font></div><div><font face="Courier New, Courier, mono" size="1">CControlBar::OnCtlColor(CDC * pDC, CWnd * pWnd, unsigned int nCtlColor) Line 686</font></div><div><font face="Courier New, Courier, mono" size="1">CWnd::OnWndMsg(unsigned int message, unsigned __int64 wParam, __int64 lParam, __int64 * pResult) Line 2341</font></div><div><font face="Courier New, Courier, mono" size="1">CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2087</font></div><div><font face="Courier New, Courier, mono" size="1">CControlBar::WindowProc(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 506</font></div><div><font face="Courier New, Courier, mono" size="1">CWnd::OnNTCtlColor(unsigned __int64 wParam, __int64 lParam) Line 1528</font></div><div><font face="Courier New, Courier, mono" size="1">CWnd::OnWndMsg(unsigned int message, unsigned __int64 wParam, __int64 lParam, __int64 * pResult) Line 2383</font></div><div><font face="Courier New, Courier, mono" size="1">CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2087</font></div><div><font face="Courier New, Courier, mono" size="1">CControlBar::WindowProc(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 506</font></div><div><font face="Courier New, Courier, mono" size="1">AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 257</font></div><div><font face="Courier New, Courier, mono" size="1">AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 420</font></div><div><font face="Courier New, Courier, mono" size="1">&nbsp;<span style="white-space:pre">	</span>&#091;External Code&#093;<span style="white-space:pre">	</span></font></div><div><font face="Courier New, Courier, mono" size="1">CXTPSkinManagerDetoursApiHook::OnHookDefDlgProcW(HWND__ * hWnd, unsigned int Msg, unsigned __int64 wParam, __int64 lParam) Line 1133</font></div><div><font face="Courier New, Courier, mono" size="1">...</font></div><div><font face="Courier New, Courier, mono" size="1">...</font></div><div><font face="Courier New, Courier, mono" size="1">...</font></div><div><font face="Courier New, Courier, mono" size="1">CXTPSkinManager::OnSkinChanged(int bPrevState, int bNewState) Line 1118</font></div></div><div><br></div><div>I am posting this question because I do not see any of our own code involved.</div><div>Do you have any idea what I might be doing wrong, or how I can continue to investigate (if it is a serious issue)?&nbsp;</div><div><br></div><div><div>MFC version 10 (of toolkit v100 of Visual Studio 2010)</div><div>ToolKit Pro MFC: 19.3.0</div><div><br></div></div><div>Kind regards,</div><div>Peter</div><div><br></div><div><div><br></div></div>]]>
   </description>
   <pubDate>Thu, 11 Feb 2021 15:06:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24132&amp;PID=78044&amp;title=mfc-assertion-after-skin-change-force-black-text#78044</guid>
  </item> 
 </channel>
</rss>