<?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 : CXTPDatePickerControl deconstructor causing assert</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : CXTPDatePickerControl deconstructor causing assert]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 30 May 2026 18:47:47 +0000</pubDate>
  <lastBuildDate>Tue, 16 Mar 2010 13:03:20 +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=4855</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[CXTPDatePickerControl deconstructor causing assert : Hello, in my case I also get...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=57634&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#57634</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5989">coffeeholic</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 16 March 2010 at 1:03pm<br /><br /><P>Hello,</P><DIV>in my case I also get a crash in XTPGetTopLevelWndMsgNotifier()-&gt;Unadvise(this);</DIV><DIV>&nbsp;</DIV><DIV>I am using the Code in an ActiveX Control in an MFC Application. The call of the date time picker itself is in one of our librarys.</DIV><DIV>&nbsp;</DIV><DIV>What if I leave all code with Advise() and Unadvise() out of the toolkit? I don't have a crash then anymore, but what features are missing or&nbsp;is the Datetime Picker&nbsp;functionalty given anyway? (I does work in this case in a short test)</DIV><DIV>&nbsp;</DIV><DIV>All help in this topic would be helpful.</DIV><DIV>&nbsp;</DIV><DIV>I forgot to mention that I tried to use AFX_MANAGE_STATE in Control too, but it didn't solve the problem.</DIV>]]>
   </description>
   <pubDate>Tue, 16 Mar 2010 13:03:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=57634&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#57634</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert : ok :) ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15864&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15864</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 19 September 2006 at 3:27pm<br /><br />ok :)]]>
   </description>
   <pubDate>Tue, 19 Sep 2006 15:27:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15864&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15864</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert : The problem was that MFC was using...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15847&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15847</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2273">Enclaved Shadow</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 19 September 2006 at 10:59am<br /><br /><DIV>The problem was that MFC was using the incorrect window handle map when trying to destroy the window.&nbsp; I added AFX_MANAGE_STATE(AfxGetAppModuleState()); to the top of the void CMyDlg::OnBtnCalendar()&nbsp; method and it fixed the problem.</DIV>]]>
   </description>
   <pubDate>Tue, 19 Sep 2006 10:59:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15847&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15847</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert : Hello, May be you can modify...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15229&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15229</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 25 August 2006 at 4:07pm<br /><br /><P>Hello,</P><DIV>May be you can modify attached sample/add MFC extension to show problem?</DIV>]]>
   </description>
   <pubDate>Fri, 25 Aug 2006 16:07:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15229&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15229</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert : The Calendar control is in a dialog...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15224&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15224</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2273">Enclaved Shadow</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 25 August 2006 at 10:48am<br /><br /><P>The Calendar control is in a dialog that is loaded from an MFC extension DLL.&nbsp; When we create the dialog off a pane on the apps main window we do not see the exception.&nbsp; When we create the dialog from a button being pushed in a control on another dialog we get the exception.&nbsp; The problem is getting to be a bit larger now because themes do not seem to be working correctly either.&nbsp; I have played around with the Button sample project found in <a href="file://\\CodeJock\ToolkitPro\Samples\C&#111;ntrols\Butt&#111;n" target="_blank">\\CodeJock\ToolkitPro\Samples\Controls\Button</A>&nbsp;and can get everything to work correctly in there but when I copy the code line for line into our app it does not work correctly.&nbsp; The themes never seem to work correctly.&nbsp; When we use themes the backgroud colour of the button is always defaulting to the same colour as the dialog's background and the button borders are never being drawn.</P><DIV>&nbsp;</DIV><DIV>The problem is not there in the DialogSample.zip, it works fine.</DIV>]]>
   </description>
   <pubDate>Fri, 25 Aug 2006 10:48:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15224&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15224</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert : Hello,  I modified our DialogSample,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15161&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15161</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 23 August 2006 at 4:51pm<br /><br />Hello, <DIV>I modified our DialogSample, added your code but don't see any problems.</DIV><DIV>please try it, do you see it on your computer?</DIV><DIV>&nbsp;</DIV><DIV><a href="https://forum.codejock.com/uploads/20060823_165119_DialogSample.zip" target="_blank">uploads/20060823_165119_DialogSample.zip</A></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 23 Aug 2006 16:51:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15161&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15161</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert :   oleg wrote: Hi, What Toolkit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15125&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15125</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2273">Enclaved Shadow</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 23 August 2006 at 8:00am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by oleg" alt="Originally posted by oleg" style="vertical-align: text-bottom;" /> <strong>oleg wrote:</strong><br /><br /><DIV>Hi,</DIV><DIV>What Toolkit version? What VC version?</DIV></td></tr></table> <DIV>We're using&nbsp;ToolkitPro 10.2</DIV>]]>
   </description>
   <pubDate>Wed, 23 Aug 2006 08:00:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15125&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15125</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert : Hi, What Toolkit version? What...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15115&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15115</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 22 August 2006 at 4:11pm<br /><br /><DIV>Hi,</DIV><DIV>What Toolkit version? What VC version?</DIV>]]>
   </description>
   <pubDate>Tue, 22 Aug 2006 16:11:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15115&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15115</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPDatePickerControl deconstructor causing assert : I am receiving a Debug Assertion...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15113&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15113</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2273">Enclaved Shadow</a><br /><strong>Subject:</strong> 4855<br /><strong>Posted:</strong> 22 August 2006 at 3:31pm<br /><br /><DIV>I am receiving a Debug Assertion Failed on line 1013&nbsp;in the microsoft&nbsp;file wincore.cpp when I run the following code:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>void CMyDlg::OnBtnCalendar() <BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp; COleDateTime oDate;<BR>&nbsp;&nbsp;&nbsp; &nbsp;CRect oRect;<BR>&nbsp;&nbsp;&nbsp; &nbsp;CString oEquationDate;<BR>&nbsp;&nbsp;&nbsp; &nbsp;<strong>CXTPDatePickerControl</strong> oDatePicker;<BR>&nbsp;&nbsp;&nbsp; &nbsp;CXTPWindowRect oPopUpRect(m_obtnCalendar.GetSafeHwnd());</DIV><DIV>&nbsp;&nbsp;&nbsp; </DIV><DIV>&nbsp;&nbsp;&nbsp; &nbsp;oDatePicker.GetMinReqRect(&amp;oRect);<BR>&nbsp;&nbsp;&nbsp; &nbsp;oDatePicker.SetButtonsVisible(FALSE, FALSE);<BR>&nbsp;&nbsp;&nbsp; &nbsp;oRect.InflateRect(0 ,0, 4, 4);<BR>&nbsp;&nbsp;&nbsp; &nbsp;oRect.OffsetRect(oPopUpRect.right - oRect.Width(), oPopUpRect.bottom);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; &nbsp;if (oDatePicker.GoModal(oRect))<BR>&nbsp;&nbsp;&nbsp; &nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oDatePicker.GetCurSel(oDate);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;oEquationDate = oDate.Format(_T("\"%Y%m%d\""));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AddText(oEquationDate, FALSE);<BR>&nbsp;&nbsp;&nbsp;&nbsp; }<BR>}</DIV><DIV>&nbsp;</DIV><DIV>The assertion does not happen until it hits the deconstructor for CXTPDatePickerControl.&nbsp; It appears as though&nbsp;I can safely ignore the assertion but the boss has a problem with all debug assertions.&nbsp; The first line in the deconstructor is:</DIV><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><DIV><FONT size=2>XTPGetTopLevelWndMsgNotifier()-&gt;Unadvise(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>);</FONT></DIV></BLOCKQUOTE><DIV dir=ltr><FONT size=2>Unadvise eventually calls <FONT size=2>VERIFY(DestroyWindow()) which then eventually makes its way down to line 1013 and asserts at <FONT size=2>ASSERT(m_hWnd == hWndOrig);</FONT></FONT></FONT></DIV><DIV dir=ltr><FONT size=2></FONT>&nbsp;</DIV><DIV dir=ltr><FONT size=2>Has anyone else experienced this problem and/or been able to come up with a solution?&nbsp;</FONT></DIV><DIV dir=ltr><FONT size=2></FONT>&nbsp;</DIV><DIV dir=ltr><FONT size=2>thanks.</FONT></DIV>]]>
   </description>
   <pubDate>Tue, 22 Aug 2006 15:31:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4855&amp;PID=15113&amp;title=cxtpdatepickercontrol-deconstructor-causing-assert#15113</guid>
  </item> 
 </channel>
</rss>