<?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 : Access Violation with CXTPControlComboBox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Access Violation with CXTPControlComboBox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 21:25:48 +0000</pubDate>
  <lastBuildDate>Thu, 22 Nov 2007 05:51:15 +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=8859</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[Access Violation with CXTPControlComboBox : I see. Thanks.  But the code...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8859&amp;PID=28731&amp;title=access-violation-with-cxtpcontrolcombobox#28731</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3468">Anna2004</a><br /><strong>Subject:</strong> 8859<br /><strong>Posted:</strong> 22 November 2007 at 5:51am<br /><br />I see. Thanks.<DIV>&nbsp;</DIV><DIV>But the code (member variable not using pointer)&nbsp;worked fine with VS2003 and XtremeToolkid Pro 9.8. Why is that?</DIV>]]>
   </description>
   <pubDate>Thu, 22 Nov 2007 05:51:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8859&amp;PID=28731&amp;title=access-violation-with-cxtpcontrolcombobox#28731</guid>
  </item> 
  <item>
   <title><![CDATA[Access Violation with CXTPControlComboBox : All Controls are destroy by CommandBars...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8859&amp;PID=28730&amp;title=access-violation-with-cxtpcontrolcombobox#28730</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=233">jimmy</a><br /><strong>Subject:</strong> 8859<br /><strong>Posted:</strong> 22 November 2007 at 5:32am<br /><br />All Controls are destroy by CommandBars Manager.<br>If you use a member variable, the CommandBars Manager will destroy the control and also the member variable will be destroyed. (double destroy of a object).<br><br>&nbsp; Jimmy<br><br>]]>
   </description>
   <pubDate>Thu, 22 Nov 2007 05:32:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8859&amp;PID=28730&amp;title=access-violation-with-cxtpcontrolcombobox#28730</guid>
  </item> 
  <item>
   <title><![CDATA[Access Violation with CXTPControlComboBox : Hi,  I am using CXTControlComboBox...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8859&amp;PID=28729&amp;title=access-violation-with-cxtpcontrolcombobox#28729</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3468">Anna2004</a><br /><strong>Subject:</strong> 8859<br /><strong>Posted:</strong> 22 November 2007 at 5:14am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I am using CXTControlComboBox in my toolbar. </DIV><DIV>&nbsp;</DIV><DIV>First, I declare it as CXTControlComboBox m_skins in MainFrame.h. </DIV><DIV>And in MainFrame.cpp, I add the strings to this combobox in the following way:</DIV><DIV>&nbsp;</DIV><DIV>int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)<BR>{<BR>&nbsp;if (lpCreateControl-&gt;nID == ID_MY_TOOL_SKIN)<BR>&nbsp;{<BR>&nbsp;&nbsp;m_skins.SetWidth(60);<BR>&nbsp;&nbsp;m_skins.SetDropDownListStyle(TRUE);<BR>&nbsp;&nbsp;m_skins.AddString(_T("Skin1"));<BR>&nbsp;&nbsp;m_skins.AddString(_T("Skin2"));</DIV><DIV>&nbsp; lpCreateControl-&gt;pControl = &amp;m_skins;<BR>&nbsp;&nbsp;return TRUE;<BR>&nbsp;}<BR>&nbsp;return FALSE;<BR>}</DIV><DIV>&nbsp;</DIV><DIV>I got <strong>Access Violation</strong> when I exit the application, when it came to destructor of CMainFrame. </DIV><DIV>&nbsp;</DIV><DIV>Then I looked through the examples and find out that I should use a pointer, like this:</DIV><DIV>&nbsp;</DIV><DIV>in MainFrame.h</DIV><DIV>CXTControlComboBox* m_skins;</DIV><DIV>&nbsp;</DIV><DIV>in MainFrame.cpp</DIV><DIV>int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)<BR>{<BR>&nbsp;if (lpCreateControl-&gt;nID == ID_MY_TOOL_SKIN)<BR>&nbsp;{<BR>&nbsp;&nbsp;m_skins = (CXTPControlComboBox*)CXTPControlComboBox::CreateObject();<BR>&nbsp;&nbsp;m_skins-&gt;AddString(_T("Skin1"));<BR>&nbsp;&nbsp;m_skins-&gt;AddString(_T("Skin2"));<BR>&nbsp;&nbsp;m_skins-&gt;SetDropDownWidth(150);<BR>&nbsp;&nbsp;lpCreateControl-&gt;pControl = m_skins;<BR>&nbsp;&nbsp;return TRUE;<BR>&nbsp;}<BR>&nbsp;return FALSE;<BR>}</DIV><DIV>&nbsp;</DIV><DIV>Could someone explain for me why?</DIV><DIV>&nbsp;</DIV><DIV>Thanks for your help</DIV>]]>
   </description>
   <pubDate>Thu, 22 Nov 2007 05:14:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8859&amp;PID=28729&amp;title=access-violation-with-cxtpcontrolcombobox#28729</guid>
  </item> 
 </channel>
</rss>