<?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 : DestroyWindow() -&gt; Run-Time Check Failure #0</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : DestroyWindow() -&gt; Run-Time Check Failure #0]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 08:30:38 +0000</pubDate>
  <lastBuildDate>Wed, 08 Aug 2007 05:24:24 +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=7714</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[DestroyWindow() -&gt; Run-Time Check Failure #0 : Hi Oleg, That&amp;#039;s what I expect,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24953&amp;title=destroywindow-runtime-check-failure-0#24953</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 08 August 2007 at 5:24am<br /><br /><P>Hi Oleg,</P><P>That's what I expect, but I'm also trying to keep a generic code for all our apps based on the base classes we already have, without tweaking all apps.</P><DIV>Is the SkinManager dependant of the the CWnd class ? I see in your examples than you seem always call it from the CMainFrame class.</DIV><DIV>&nbsp;</DIV><DIV>Would it be possible to all LoadSkin from CWinApp::InitInstance() or is it too early ?</DIV><DIV>&nbsp;</DIV><DIV>Thank for your support</DIV><DIV>&nbsp;</DIV><DIV>Dominique</DIV>]]>
   </description>
   <pubDate>Wed, 08 Aug 2007 05:24:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24953&amp;title=destroywindow-runtime-check-failure-0#24953</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Hello,  You only need call LoadSkin...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24948&amp;title=destroywindow-runtime-check-failure-0#24948</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 08 August 2007 at 2:16am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>You only need call LoadSkin&nbsp; in main application.</DIV>]]>
   </description>
   <pubDate>Wed, 08 Aug 2007 02:16:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24948&amp;title=destroywindow-runtime-check-failure-0#24948</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Hi Oleg, We have another issue/question...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24941&amp;title=destroywindow-runtime-check-failure-0#24941</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 07 August 2007 at 10:23am<br /><br /><P>Hi Oleg,</P><P>We have another issue/question with skinning.</P><P>We have many .exe and .dll that have to be skinned and we have many base classes derived from CMDIFrameWnd, CFrameWnd, CPropertySheet and CDialog.</P><P>What would be convenient is to call the LoadSkin in each of these classes constructors, so all would be automatic.</P><DIV>I've tried to check.</DIV><P>It seems&nbsp;working fine&nbsp;for MDI frame (there's only one per app), but I observe some refresh and flicking everytime we open any of these&nbsp;frame, dialog or sheet&nbsp;in an application already skinned.</P><DIV>Is it OK to call&nbsp;LoadSkin everytime for every window or does this eats GDI resources... or even may cause some of the performance issues related in thread #24926 ?</DIV><DIV>&nbsp;</DIV><DIV>Is ther any better way ? I would like to avoid to add the LoadSkin() in every application or dll, but only once, etc... Would be much easier to have it automatic.</DIV><DIV>&nbsp;</DIV><DIV>Thanks for your thoughts</DIV><DIV>&nbsp;</DIV><DIV>Dominique</DIV>]]>
   </description>
   <pubDate>Tue, 07 Aug 2007 10:23:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24941&amp;title=destroywindow-runtime-check-failure-0#24941</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Hello,  Only one difference...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24871&amp;title=destroywindow-runtime-check-failure-0#24871</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 04 August 2007 at 2:20am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Only one difference - it will skin only main thread - if you create dialogs in another threads they will be not skinned.</DIV>]]>
   </description>
   <pubDate>Sat, 04 Aug 2007 02:20:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24871&amp;title=destroywindow-runtime-check-failure-0#24871</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Hi Oleg, Works now. Thanks for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24851&amp;title=destroywindow-runtime-check-failure-0#24851</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 03 August 2007 at 10:01am<br /><br /><P>Hi Oleg,</P><P>Works now. Thanks for the fix.</P><P>By temporary workaround, do you mean this will have an impact on performances (or some other impact)&nbsp;on multithreaded apps or we can live with this solution more or less permanently ?</P><P>Thanks again</P><P>Dominique</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Fri, 03 Aug 2007 10:01:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24851&amp;title=destroywindow-runtime-check-failure-0#24851</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Hello,   As temporary workaround...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24828&amp;title=destroywindow-runtime-check-failure-0#24828</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 03 August 2007 at 3:33am<br /><br />Hello, <DIV>&nbsp;</DIV><DIV>As temporary workaround you can disable auto apply new threads:</DIV><DIV>&nbsp;</DIV><DIV>XTPSkinManager()-&gt;SetAutoApplyNewThreads(FALSE);</DIV>]]>
   </description>
   <pubDate>Fri, 03 Aug 2007 03:33:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24828&amp;title=destroywindow-runtime-check-failure-0#24828</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Yes, it is a heavily multithreaded...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24813&amp;title=destroywindow-runtime-check-failure-0#24813</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 02 August 2007 at 4:38pm<br /><br />Yes, it is a heavily multithreaded application.<DIV>&nbsp;</DIV><DIV>However, what is strange is that it seems that it worked fine under 10.3.1...</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 02 Aug 2007 16:38:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24813&amp;title=destroywindow-runtime-check-failure-0#24813</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Is this a multithreaded app? I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24811&amp;title=destroywindow-runtime-check-failure-0#24811</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1755">ABuenger</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 02 August 2007 at 4:01pm<br /><br />Is this a multithreaded app? I had several problems when the MDI main frame terminates a thread after OnClose has been called.<br><br>]]>
   </description>
   <pubDate>Thu, 02 Aug 2007 16:01:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24811&amp;title=destroywindow-runtime-check-failure-0#24811</guid>
  </item> 
  <item>
   <title><![CDATA[DestroyWindow() -&gt; Run-Time Check Failure #0 : Hi all,  When calling DestroyWindow()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24808&amp;title=destroywindow-runtime-check-failure-0#24808</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 7714<br /><strong>Posted:</strong> 02 August 2007 at 1:40pm<br /><br />Hi all,<DIV>&nbsp;</DIV><DIV>When calling DestroyWindow() on either a CMDIChildWnd or CMDIFrameWnd (called by MFC in OnClose()) produces the following crash in&nbsp;<FONT size=2>CXTPSkinManagerApiHook::ThreadProcHook()</FONT></DIV><DIV>&nbsp;</DIV><DIV>Error: Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call.</DIV><DIV>&nbsp;</DIV><DIV>Just upgraded to toolkit 11.1.3 and observing this one. Was fine under 10.3.1.</DIV><DIV>&nbsp;</DIV><DIV>An other application that I just skinned by adding only the two following lines (and nothing else at all) produces the same issue.</DIV><DIV>&nbsp;</DIV><FONT size=2><P>XTPSkinManager()-&gt;SetApplyOptions(xtpSkinApplyFrame | xtpSkinApplyColors | xtpSkinApplyMetrics);</P><P>XTPSkinManager()-&gt;LoadSkin(_T(</FONT><FONT color=#808080 size=2>"d:\\XtremeToolkitPro\\Bin\\vc71\\Styles\\Vista.cjstyles"</FONT><FONT size=2>), _T(</FONT><FONT color=#808080 size=2>"NormalBlack.ini"</FONT><FONT size=2>));</P><DIV></DIV><P>Am I missing something ?</P><DIV></DIV><DIV></DIV>Thanks for your help<DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><P>Dominique</P><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV></FONT>]]>
   </description>
   <pubDate>Thu, 02 Aug 2007 13:40:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7714&amp;PID=24808&amp;title=destroywindow-runtime-check-failure-0#24808</guid>
  </item> 
 </channel>
</rss>