<?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 : WM_DESTROY of subclassed ActiveX control</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : WM_DESTROY of subclassed ActiveX control]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 13:22:52 +0000</pubDate>
  <lastBuildDate>Fri, 21 Jul 2006 16:12: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=4637</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[WM_DESTROY of subclassed ActiveX control : Hello; Myfirst thought also was...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4637&amp;PID=14300&amp;title=wm-destroy-of-subclassed-activex-control#14300</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 4637<br /><strong>Posted:</strong> 21 July 2006 at 4:12pm<br /><br /><P>Hello;</P><P>My&nbsp;first thought also was that it has nothing to do with the toolkit. This resulted in a several weeks lasting conversation with Microsoft. At least&nbsp;I built two test applications - one with, one w/o toolkit integration. The toolkit version shows this behaviour. The plain MFC version is calling the handler.</P><P>So at the moment&nbsp;I believe it has something to do with your installed message hooks.</P><P>To reproduce it, you only have to create a simple MDI application and extend it with one ActiveX control member within the CView derived MDI client window view. To simplify the subclassing and message handling I derived from the CWnd control wrapper class and only inserted two message handler into this class - one for WM_SIZE and one for WM_DESTROY. OnSize is called while OnDestroy not</P><P>Thats all&nbsp;...</P><P>Martin</P>]]>
   </description>
   <pubDate>Fri, 21 Jul 2006 16:12:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4637&amp;PID=14300&amp;title=wm-destroy-of-subclassed-activex-control#14300</guid>
  </item> 
  <item>
   <title><![CDATA[WM_DESTROY of subclassed ActiveX control : Hello, I don&amp;#039;t think toolkit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4637&amp;PID=14291&amp;title=wm-destroy-of-subclassed-activex-control#14291</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4637<br /><strong>Posted:</strong> 21 July 2006 at 2:44pm<br /><br /><DIV>Hello,</DIV><DIV>I don't think toolkit can do it. Check your code.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 21 Jul 2006 14:44:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4637&amp;PID=14291&amp;title=wm-destroy-of-subclassed-activex-control#14291</guid>
  </item> 
  <item>
   <title><![CDATA[WM_DESTROY of subclassed ActiveX control : Hi;  After ugrading from toolkit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4637&amp;PID=14279&amp;title=wm-destroy-of-subclassed-activex-control#14279</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 4637<br /><strong>Posted:</strong> 21 July 2006 at 11:15am<br /><br />Hi;<DIV>&nbsp;</DIV><DIV>After ugrading from toolkit 4.1 to toolkit 10.1 or 10.2 the WM_DESTROY message handler of subclassed ActiveX controls is no longer called.</DIV><DIV>To reproduce create a MDI application with toolkit wizard (VC++ .NET 2003) and insert a ActiveX control as a member of the CView derived class of the MDI child window.</DIV><DIV>&nbsp;</DIV><DIV>In OnCreate() handler of the view create and subclass the ActiveX control. Subclassing is necessary to receive and handle WM_xxx messages within the CWnd derived wrapper class of the control.<BR><BR><FONT color=#008000 size=2>&nbsp;</FONT></DIV><P align=left><FONT face="Courier New, Courier, mono" size=2>// COCXTestView message handlers</FONT></P><DIV align=left><FONT size=2><FONT face="Courier New, Courier, mono" color=#0000ff>int</FONT><FONT face="Courier New, Courier, mono"> COCXTestView::OnCreate(LPCREATESTRUCT lpcs)</FONT></FONT></DIV><P align=left><FONT face="Courier New, Courier, mono" size=2>{</FONT></P><P align=left><FONT size=2><FONT face="Courier New, Courier, mono" color=#0000ff>if</FONT><FONT face="Courier New, Courier, mono"> (CView::OnCreate(lpcs)!=0)</FONT></FONT></P><P align=left><FONT size=2><FONT face="Courier New, Courier, mono" color=#0000ff>return</FONT><FONT face="Courier New, Courier, mono"> -1;</FONT></FONT></P><P align=left><FONT size=2><FONT face="Courier New, Courier, mono">VERIFY(_OCXControl.Create(0,0, WS_VISIBLE|WS_CHILD, CRect(0,0,0,0), </FONT><FONT face="Courier New, Courier, mono" color=#0000ff>this</FONT><FONT face="Courier New, Courier, mono">, 1));</FONT></FONT></P><P align=left><FONT face="Courier New, Courier, mono" size=2>HWND hWnd=_OCXControl.Detach();</FONT></P><P align=left><FONT face="Courier New, Courier, mono" size=2>VERIFY_OCXControl.SubclassWindow(hWnd));</FONT></P><P align=left><FONT size=2><FONT face="Courier New, Courier, mono" color=#0000ff>return</FONT><FONT face="Courier New, Courier, mono"> 0;</FONT></FONT></P><P align=left><FONT face="Courier New, Courier, mono" size=2>}</FONT></P><DIV align=left><FONT face="Courier New, Courier, mono" size=2></FONT>&nbsp;</DIV><DIV>Insert a WM_DESTROY message handler into the wrapper class of the ActiveX control and for testing purposes also a WM_SIZE handler (to asure that WM_xxx messages are routet through the message map of the CWnd wrapper class.</DIV><DIV>&nbsp;</DIV><DIV>When compiling and linking with Toolkit 4.1 the WM_DESTROY message of the wrapper class gets called but when linking to Toolkit 10.x it never gets called.</DIV><DIV>&nbsp;</DIV><DIV>Since we have to cleanup in this handler, we need the OnDestroy() mechanism. </DIV><DIV>&nbsp;</DIV><DIV>Any Ideas whats wrong and how to fix this.</DIV><DIV>&nbsp;</DIV><DIV>Martin</DIV>]]>
   </description>
   <pubDate>Fri, 21 Jul 2006 11:15:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4637&amp;PID=14279&amp;title=wm-destroy-of-subclassed-activex-control#14279</guid>
  </item> 
 </channel>
</rss>