<?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 : CXTButt&#111;n crashes</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTButt&#111;n crashes]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 06 Apr 2026 10:17:18 +0000</pubDate>
  <lastBuildDate>Fri, 11 Nov 2005 15:51:09 +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=3191</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[CXTButt&#111;n crashes : It would be my understanding that...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9587&amp;title=cxtbutton-crashes#9587</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1573">rock</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 11 November 2005 at 3:51pm<br /><br /><P>It would be my understanding that the different byte alignment would only apply to the functions within the scope of the #pragma statements.</P><P>You are right about the #pragma pack(push, X) statements</P><P>This link might also provide more information:</P><P> http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/vccore/html/_core_.2f.zp.asp </P>]]>
   </description>
   <pubDate>Fri, 11 Nov 2005 15:51:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9587&amp;title=cxtbutton-crashes#9587</guid>
  </item> 
  <item>
   <title><![CDATA[CXTButt&#111;n crashes : perfect rock.. you are a good...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9585&amp;title=cxtbutton-crashes#9585</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1577">jigarmehtamscit</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 11 November 2005 at 2:09pm<br /><br />perfect rock.. you are a good teacher indeed..<br><br>I understood it well..<br><br>But one question that arise in my mind that, if a structure object thatis passed to xtreme libs as we as used by your application.. so, howwill that be packed ?? will that on the fly change the packing type ?(I dont think that would be the way..)<br><br>And what I understood by your answer is,<br><br>If we want to have our data to be differently aligned for some snippetof code, we need to pack that snippet accordingly by the statement,<br><font color="#0000ff" size="2"><font color="#000000" size="1"><br>#pragma</font></font><font color="#000000" size="1"> pack(push, X)<br><br>Tell me if i am wrong anywhere..<br><br>Thx for the valuable information..<br></font>]]>
   </description>
   <pubDate>Fri, 11 Nov 2005 14:09:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9585&amp;title=cxtbutton-crashes#9585</guid>
  </item> 
  <item>
   <title><![CDATA[CXTButt&#111;n crashes : Jigar, I&amp;#039;ll do my best to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9580&amp;title=cxtbutton-crashes#9580</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1573">rock</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 11 November 2005 at 9:06am<br /><br /><P>Jigar,</P><P>I'll do my best to explain.&nbsp; The "Struct Member Alignment" option in the C++ Code Generation section of the project properties tells the compiler how to pack the members of structures in memory based on byte boundries.</P><P>My application has this set to 1 byte.&nbsp; While the default for Visual Studio apps is set to 8; which is also what the&nbsp;XTreme libraries are set to.&nbsp; Passing data between 2 sets of code with different settings&nbsp;could cause memory corruption.</P><P>The #pragma pack(push, 8)&nbsp; tells the compiler to use 8 byte alignment for any code following that statement.&nbsp; In this case the XTreme Toolkit libs.&nbsp; Then #pragma pack(pop) just restores the orignal setting (in my case 1 byte alignment) for the remainder of the code or until another #pragma or other instruction is encountered.&nbsp; With these statements, any data passed to the XTreme Libs uses 8 byte alignment while the rest of my code uses 1 byte (I hope)</P><P>I'm neither a teacher or an expert, but I hope this helps.</P>]]>
   </description>
   <pubDate>Fri, 11 Nov 2005 09:06:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9580&amp;title=cxtbutton-crashes#9580</guid>
  </item> 
  <item>
   <title><![CDATA[CXTButt&#111;n crashes : Hi rock,  can you please explain...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9557&amp;title=cxtbutton-crashes#9557</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1577">jigarmehtamscit</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 10 November 2005 at 3:19pm<br /><br />Hi rock,<br><br>can you please explain what these statements does ?? And how this solves the problem ?<br>]]>
   </description>
   <pubDate>Thu, 10 Nov 2005 15:19:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9557&amp;title=cxtbutton-crashes#9557</guid>
  </item> 
  <item>
   <title><![CDATA[CXTButt&#111;n crashes : A simplier soultion that works...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9553&amp;title=cxtbutton-crashes#9553</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1573">rock</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 10 November 2005 at 10:32am<br /><br /><P>A simplier soultion that works fine rather than&nbsp;recompile the CodeJock libraries was for me to add the following to my stdafx.h file</P><FONT color=#0000ff size=2><P><FONT color=#000000 size=1>#pragma</FONT></FONT><FONT color=#000000 size=1> pack(push, 8)</FONT></P><P><FONT color=#000000><FONT size=1>#include</FONT><FONT size=1> &lt;XTToolkitPro.h&gt; // Xtreme Toolkit Pro component library</P></FONT></FONT><P><FONT color=#000000><FONT size=1>#pragma</FONT><FONT size=1> pack(pop)</FONT></FONT><FONT size=2></P></FONT>]]>
   </description>
   <pubDate>Thu, 10 Nov 2005 10:32:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9553&amp;title=cxtbutton-crashes#9553</guid>
  </item> 
  <item>
   <title><![CDATA[CXTButt&#111;n crashes : That thought did occur to me after...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9551&amp;title=cxtbutton-crashes#9551</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1573">rock</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 10 November 2005 at 8:29am<br /><br />That thought did occur to me after I got away from working on it and was able to think about it.&nbsp; And no, our app has it set to 1.&nbsp; Unfortunately the engine dll for our app requires us to have structure package set to 1.&nbsp;&nbsp; Is there any harm in recompiling the CodeJock libraries with the setting at 1 instead of 8?]]>
   </description>
   <pubDate>Thu, 10 Nov 2005 08:29:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9551&amp;title=cxtbutton-crashes#9551</guid>
  </item> 
  <item>
   <title><![CDATA[CXTButt&#111;n crashes : Do you have standard structure...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9540&amp;title=cxtbutton-crashes#9540</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 10 November 2005 at 3:16am<br /><br /><P>Do you have standard structure package - 8?</P>]]>
   </description>
   <pubDate>Thu, 10 Nov 2005 03:16:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9540&amp;title=cxtbutton-crashes#9540</guid>
  </item> 
  <item>
   <title><![CDATA[CXTButt&#111;n crashes : I have discoved that if I try...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9529&amp;title=cxtbutton-crashes#9529</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1573">rock</a><br /><strong>Subject:</strong> 3191<br /><strong>Posted:</strong> 09 November 2005 at 2:46pm<br /><br /><P><FONT face="Arial, Helvetica, sans-serif" size=2>I have discoved that if I try to use more than one CXTButton in any of my dialog box classes, my application will crash inside of XTPImageManager.cpp in the CXTPImageManagerIconHandle::IsEmpty() function.</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>I've also found out that if I try to use a CXTButton in a CView derived class, I get an assertion error when calling CXTButton::SetIcon() when the function SAFE_DELETE(m_pIcon) is called.&nbsp; The code I use is similar to what I found in the Explorer GUI sample:</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>myheader file:</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>CImageList m_ilButton:</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>CXTButton m_addBtn;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>my cpp file:</FONT></P><P><FONT size=2><FONT face="Arial, Helvetica, sans-serif">m_ilButton.Create(XT_IDB_BTN_OUT, </FONT><FONT face="Arial, Helvetica, sans-serif"><FONT color=#800000>16</FONT>, <FONT color=#800000>1</FONT>, RGB(<FONT color=#800000>255</FONT>,<FONT color=#800000>0</FONT>,<FONT color=#800000>255</FONT>));</FONT></FONT></P><FONT color=#0000ff><P><FONT face="Arial, Helvetica, sans-serif" size=2>if</FONT></FONT><FONT size=2><FONT face="Arial, Helvetica, sans-serif"> (m_btnAdd.Create(NULL, WS_VISIBLE | BS_ICON | BS_OWNERDRAW | BS_CENTER | BS_VCENTER, CRect(<FONT color=#800000>0</FONT>,<FONT color=#800000>0</FONT>,<FONT color=#800000>0</FONT>,<FONT color=#800000>0</FONT>), <FONT color=#0000ff>this</FONT></FONT><FONT face="Arial, Helvetica, sans-serif">, IDC_BTN_CREATE))</FONT></FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>{</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>m_btnAdd.SetIcon(CSize(16, 15), m_ilButton.ExtractIcon(<FONT color=#800000>2</FONT>));</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>m_btnAdd.SetTheme(xtThemeDefault);</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>m_btnAdd.SetXButtonStyle(BS_XT_WINXP_COMPAT);</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>I added a watch to m_btnAdd.m_pIcon and it is NULL before I enter SetIcon(), but then once I'm into the CXTButton code it is no longer NULL.&nbsp; I've tried increasing the application stack size but there is no difference, it still crashes.&nbsp; Have I missed something obvious.&nbsp; I'm using Visual Studio 2003.</FONT></P>]]>
   </description>
   <pubDate>Wed, 09 Nov 2005 14:46:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=3191&amp;PID=9529&amp;title=cxtbutton-crashes#9529</guid>
  </item> 
 </channel>
</rss>