<?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 : Crash inside CXTPFontDC::SetFont()</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Crash inside CXTPFontDC::SetFont()]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 19:33:24 +0000</pubDate>
  <lastBuildDate>Mon, 22 Oct 2007 06:52:16 +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=8031</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[Crash inside CXTPFontDC::SetFont() : Thanks for the suggestion - it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=27525&amp;title=crash-inside-cxtpfontdcsetfont#27525</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 8031<br /><strong>Posted:</strong> 22 October 2007 at 6:52am<br /><br />Thanks for the suggestion - it helped to avoid the crash so far.<br>I guess there must be some problem with how MFC maintains its map of temporary CDC objects.<br>]]>
   </description>
   <pubDate>Mon, 22 Oct 2007 06:52:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=27525&amp;title=crash-inside-cxtpfontdcsetfont#27525</guid>
  </item> 
  <item>
   <title><![CDATA[Crash inside CXTPFontDC::SetFont() : Hello,  Please try to rewrite...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=26063&amp;title=crash-inside-cxtpfontdcsetfont#26063</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8031<br /><strong>Posted:</strong> 18 September 2007 at 2:20am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Please try to rewrite CXTPCommandBar::OnPrintClient as</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;CDC dc;<BR>&nbsp;dc.Attach((HDC)wParam);<BR>&nbsp;DrawCommandBar(&amp;dc, CXTPClientRect(this));<BR>&nbsp;dc.Detach();</DIV><DIV>&nbsp;</DIV><DIV>and check if you can reproduce it.</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV>]]>
   </description>
   <pubDate>Tue, 18 Sep 2007 02:20:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=26063&amp;title=crash-inside-cxtpfontdcsetfont#26063</guid>
  </item> 
  <item>
   <title><![CDATA[Crash inside CXTPFontDC::SetFont() :  Hello,the WM_PRINT is sent by...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=26003&amp;title=crash-inside-cxtpfontdcsetfont#26003</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 8031<br /><strong>Posted:</strong> 17 September 2007 at 5:57am<br /><br />Hello,<br>the WM_PRINT is sent by the system (Vista) itself, so I guess the device context should be valid. Plus, its <b><font color="#0000ff">validity is checked</font></b> in your code inside <font face="Courier New, Courier, mono">CXTPCommandBar::DrawCommandBar()</font>, so I think this is not the problem.<br><br>However, maybe the CDC object itself - acquired inside <font face="Courier New, Courier, mono">CXTPCommandBar::OnPrint()</font> - can be deleted somehow, thus a non-valid object is dereferenced inside the ctor of <font face="Courier New, Courier, mono">CXTPFontDC</font>. What do you think, how can this happen? I've got<font color="#000000"> </font><font color="#000000">no good explanation</font> for this, since MFC should delete <font color="#0000ff"><b>temporary CDC objects</b></font> only during OnIdle() - but that's _not_ our case, since we're still inside the processing of the same WM_PRINT message.<br><br>I'm affraid we cannot replace our specialized, owner-draw combobox with a CXTPControl-based class. Do you have any other idea how to get around this crash?<br>Thank you, in advance!<br><br>]]>
   </description>
   <pubDate>Mon, 17 Sep 2007 05:57:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=26003&amp;title=crash-inside-cxtpfontdcsetfont#26003</guid>
  </item> 
  <item>
   <title><![CDATA[Crash inside CXTPFontDC::SetFont() : Hi,  Looking to code and call...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=25994&amp;title=crash-inside-cxtpfontdcsetfont#25994</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8031<br /><strong>Posted:</strong> 17 September 2007 at 5:26am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Looking to code and call stack I can say that it can happen only if something send not valid device context with WM_PRINT message.</DIV><DIV>&nbsp;</DIV><DIV>try to remove this comboxbox and check if problem can be reproduced. May be you can replace it to our CXTPControlComboBox ?</DIV>]]>
   </description>
   <pubDate>Mon, 17 Sep 2007 05:26:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=25994&amp;title=crash-inside-cxtpfontdcsetfont#25994</guid>
  </item> 
  <item>
   <title><![CDATA[Crash inside CXTPFontDC::SetFont() :    The call stack comes from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=25986&amp;title=crash-inside-cxtpfontdcsetfont#25986</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 8031<br /><strong>Posted:</strong> 17 September 2007 at 2:45am<br /><br />The call stack comes from processing <font color="#0000ff"><b>WM_PRINT</b></font> or WM_PRINTCLIENT messages which is what e.g. plain combobox controls are sent to on Vista systems when you e.g. hover your mouse over them. However, the crash doesn't happen during hovering. It just happens when working with any other parts of the application.<br><br>We have one such plain combobox inserted as a custom control in an XTP toolbar. Do you think this can cause any problems somehow?<br><br>]]>
   </description>
   <pubDate>Mon, 17 Sep 2007 02:45:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=25986&amp;title=crash-inside-cxtpfontdcsetfont#25986</guid>
  </item> 
  <item>
   <title><![CDATA[Crash inside CXTPFontDC::SetFont() :  Hello,we&amp;#039;ve got access...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=25985&amp;title=crash-inside-cxtpfontdcsetfont#25985</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2014">akur</a><br /><strong>Subject:</strong> 8031<br /><strong>Posted:</strong> 17 September 2007 at 2:43am<br /><br />Hello,<br><br>we've got access violation crashes inside the <font color="#0000ff"><b>CXTPFontDC</b></font> class. This is how the call stack looks like (excerpt from a Release build's crashdump):<br><br><font face="Courier New, Courier, mono" size="1"></font><img src="uploads/20070917_024148_CXTPFontDC_call.PNG" height="209" width="613" border="0"><br><br>It happens sporadically from time to time (like once a week), but on 3 different computers at least. All these computers run Vista Business or Vista Ultimate and all of them are dual-core processors. Don't know if it matters.<br><br>Do you have any idea how to fix or any workaround for this?<br>Thanks a lot, in advance!<br><br><br>]]>
   </description>
   <pubDate>Mon, 17 Sep 2007 02:43:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8031&amp;PID=25985&amp;title=crash-inside-cxtpfontdcsetfont#25985</guid>
  </item> 
 </channel>
</rss>