<?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 : AfxDynamicDownCast fails ?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : AfxDynamicDownCast fails ?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 22 Apr 2026 01:47:37 +0000</pubDate>
  <lastBuildDate>Fri, 17 Apr 2009 01:49:39 +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=14021</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[AfxDynamicDownCast fails ? : ok :) great it works now. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48041&amp;title=afxdynamicdowncast-fails#48041</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 17 April 2009 at 1:49am<br /><br />ok :) great it works now.]]>
   </description>
   <pubDate>Fri, 17 Apr 2009 01:49:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48041&amp;title=afxdynamicdowncast-fails#48041</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? : Time being i fixed it by the following...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48005&amp;title=afxdynamicdowncast-fails#48005</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 7:28am<br /><br />Time being i fixed it by the following code ...<br><br>#ifdef _AFXDLL<br><br>&nbsp;<font color="#ff0000">&nbsp;&nbsp; CString version;<br>&nbsp;&nbsp;&nbsp; version.Format("%d",_XTPLIB_VERSION_PREFIX);&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br></font><br>&nbsp;&nbsp;&nbsp; // search classes in shared DLLs<br>&nbsp;&nbsp;&nbsp; for (CDynLinkLibrary* pDLL = pModuleState-&gt;m_libraryList; pDLL != NULL;<br>&nbsp;&nbsp;&nbsp; pDLL = pDLL-&gt;m_pNextDLL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;<font color="#ff0000"> &nbsp;&nbsp;&nbsp; char buff&#091;MAX_PATH&#093;;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; memset(buff,0,MAX_PATH);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ::GetModuleFileName(pDLL-&gt;m_hModule,buff,MAX_PATH);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(CString(buff).Find(version) != -1)&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</font><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (pClass = pDLL-&gt;m_classList; pClass != NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pClass = pClass-&gt;m_pNextClass)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (lstrcmpA(szClassName, pClass-&gt;m_lpszClassName) == 0)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return pClass;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <font color="#ff0000">}</font><br>&nbsp;&nbsp;&nbsp; }<br>#endif<br><br><br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 07:28:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48005&amp;title=afxdynamicdowncast-fails#48005</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? :  Whoop! Finally find out the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48001&amp;title=afxdynamicdowncast-fails#48001</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 6:21am<br /><br />Whoop! Finally find out the problem, My exe uses some dlls that still not ported to new XT version (which the exe uses) so the old XT dll come in the dynalib list and messed up the things.<br><br>Hearty <img src="http://forum.codejock.com/smileys/smiley27.gif" border="0" align="absmiddle"> Thanks Oleg for your patient and support. <br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 06:21:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48001&amp;title=afxdynamicdowncast-fails#48001</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? : pClass get value like string only...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48000&amp;title=afxdynamicdowncast-fails#48000</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 5:22am<br /><br />pClass get value like string only in the Red code region not in the Blue code region. <img src="http://forum.codejock.com/smileys/smiley5.gif" border="0" align="absmiddle"><br><br>CRuntimeClass* CXTPPropExchange::FindRuntimeClass(LPCSTR szClassName)<br>{<br><br>&nbsp;&nbsp; &nbsp;CRuntimeClass* pClass;<br>&nbsp;&nbsp; &nbsp;// search app specific classes<br>&nbsp;&nbsp; &nbsp;AFX_MODULE_STATE* pModuleState = AfxGetModuleState();<br><br>&nbsp;&nbsp; <font color="#0000ff">&nbsp;for (pClass = pModuleState-&gt;m_classList; pClass != NULL;<br>&nbsp;&nbsp; &nbsp;pClass = pClass-&gt;m_pNextClass)<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (lstrcmpA(szClassName, pClass-&gt;m_lpszClassName) == 0)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return pClass;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;}</font><br><br>#ifdef _AFXDLL<br>&nbsp;&nbsp; &nbsp;// search classes in shared DLLs<br>&nbsp;&nbsp; &nbsp;for (CDynLinkLibrary* pDLL = pModuleState-&gt;m_libraryList; pDLL != NULL;<br>&nbsp;&nbsp; &nbsp;pDLL = pDLL-&gt;m_pNextDLL)<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp;<font color="#ff0000"> &nbsp;&nbsp;&nbsp; &nbsp;for (pClass = pDLL-&gt;m_classList; pClass != NULL;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pClass = pClass-&gt;m_pNextClass)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (lstrcmpA(szClassName, pClass-&gt;m_lpszClassName) == 0)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return pClass;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}</font><br>&nbsp;&nbsp; &nbsp;}<br>#endif<br>&nbsp;&nbsp; &nbsp;ASSERT(FALSE);<br>&nbsp;&nbsp; &nbsp;return 0;<br>}<br><br><br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 05:22:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=48000&amp;title=afxdynamicdowncast-fails#48000</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? : Thanks Oleg, I checkedout my code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47998&amp;title=afxdynamicdowncast-fails#47998</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 5:15am<br /><br />Thanks Oleg, I checkedout my code it didnt have any overrides for DECLARE_DYNAMIC/IMPLEMENT_DYNAMIC.<br><br><br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 05:15:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47998&amp;title=afxdynamicdowncast-fails#47998</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? : Hi, see DECLARE_DYNAMIC sources....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47994&amp;title=afxdynamicdowncast-fails#47994</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 4:18am<br /><br /><P>Hi,</P><DIV>see DECLARE_DYNAMIC sources. Myabe you override this macros ?</DIV>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 04:18:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47994&amp;title=afxdynamicdowncast-fails#47994</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? : When i try using CustomizeDlg...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47987&amp;title=afxdynamicdowncast-fails#47987</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 3:18am<br /><br />When i try using CustomizeDlg sample the pClass in <br><br>CRuntimeClass* CXTPPropExchange::FindRuntimeClass(LPCSTR szClassName)<br><br>has value like "struct CRuntimeClass CXTPMenuBar::classCXTPMenuBar" <br>but when i try using my app exe the value became like "CXTPMenuBar" ? <img src="http://forum.codejock.com/smileys/smiley5.gif" border="0" align="absmiddle"><br><br><br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 03:18:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47987&amp;title=afxdynamicdowncast-fails#47987</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? :  Hi, Code to checkBOOL CXTPPr...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47983&amp;title=afxdynamicdowncast-fails#47983</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 3:00am<br /><br />Hi, <br><br>Code to check<br><br>BOOL CXTPPropExchange::ExchangeObjectInstance(CObject*&amp; pObject, CRuntimeClass* pObjectRuntime)<br>{<br>&nbsp;&nbsp;&nbsp; if (!IsLoading())<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CRuntimeClass* pClass = pObject-&gt;GetRuntimeClass();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PX_RuntimeClass(this, _T("Class"), pClass, pObjectRuntime);<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CRuntimeClass* pClass = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PX_RuntimeClass(this, _T("Class"), pClass, pObjectRuntime);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!pClass)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return FALSE;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <font color="#003399">const CRuntimeClass* pClassThis = pClass;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; while (pClassThis != NULL)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pClassThis == pObjectRuntime)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return TRUE;<br>&nbsp;&nbsp;&nbsp; #ifdef _AFXDLL<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pClassThis = (*pClassThis-&gt;m_pfnGetBaseClass)();<br>&nbsp;&nbsp;&nbsp; #else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pClassThis = pClassThis-&gt;m_pBaseClass;<br>&nbsp;&nbsp;&nbsp; #endif<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return FALSE;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // walked to the top, no match</font><br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pObject = (CObject*)AfxDynamicDownCast(pObjectRuntime, pClass-&gt;CreateObject());<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!pObject)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return FALSE;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; return TRUE;<br>}<br><br><br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 03:00:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47983&amp;title=afxdynamicdowncast-fails#47983</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? : Hi,In, BOOL CRuntimeClass::IsDerivedFrom(const...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47982&amp;title=afxdynamicdowncast-fails#47982</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 2:38am<br /><br />Hi,<br><br>In, BOOL CRuntimeClass::IsDerivedFrom(const CRuntimeClass* pBaseClass) const<br><br>the line if (pClassThis == pBaseClass) returns FALSE<br><br>When pClassThis is "CXTPCommandBar" and pBaseClass is "struct CRuntimeClass CXTPCommandBar::classCXTPCommandBar"<br><br>Is that ring any bell ?<br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 02:38:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47982&amp;title=afxdynamicdowncast-fails#47982</guid>
  </item> 
  <item>
   <title><![CDATA[AfxDynamicDownCast fails ? : Thanks Oleg, Yes after adding...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47981&amp;title=afxdynamicdowncast-fails#47981</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1754">kanitamildasan</a><br /><strong>Subject:</strong> 14021<br /><strong>Posted:</strong> 16 April 2009 at 2:15am<br /><br />Thanks Oleg, <br><br>Yes after adding AfxOleInit() the customizedlg sample works correctly.<br>But still i didnt find the way to reproduce the same problem in my app.<br><br><br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2009 02:15:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14021&amp;PID=47981&amp;title=afxdynamicdowncast-fails#47981</guid>
  </item> 
 </channel>
</rss>