<?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 : [solved]wrong serialization in CXTPControlComboBox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : [solved]wrong serialization in CXTPControlComboBox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 07:36:18 +0000</pubDate>
  <lastBuildDate>Fri, 08 Dec 2017 15:15:42 +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=23508</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[[solved]wrong serialization in CXTPControlComboBox : Hello,We fixed this with    int...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76389&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76389</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23508<br /><strong>Posted:</strong> 08 December 2017 at 3:15pm<br /><br />Hello,<br><br>We fixed this with <table width="99%"><tr><td><pre class="BBcode">&nbsp; &nbsp; int nUnusedWidth = <b><font color="#00cc00">m_nWidth</font></b>;<div>&nbsp; &nbsp; PX_DPI_X_Int(pPX, _T("Width"), nUnusedWidth, 0);</pre></td></tr></table></div><div><br>Regards,<br>&nbsp;Oleksandr Lebed</div>]]>
   </description>
   <pubDate>Fri, 08 Dec 2017 15:15:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76389&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76389</guid>
  </item> 
  <item>
   <title><![CDATA[[solved]wrong serialization in CXTPControlComboBox : Hi Codejock Team,the width related...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76378&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76378</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3014">mschumi</a><br /><strong>Subject:</strong> 23508<br /><strong>Posted:</strong> 06 December 2017 at 12:01pm<br /><br />Hi Codejock Team,<br><br>the width related code in <br>void CXTPControlComboBox::DoPropExchange(CXTPPropExchange* pPX)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPControlPopup::DoPropExchange(pPX);<br><br>&nbsp;&nbsp;&nbsp; PX_Bool(pPX, _T("DropDown"), m_bDropDown, TRUE);<br><br>&nbsp;&nbsp;&nbsp; // The Width property is already serialized in CXTPControl<br>&nbsp;&nbsp;&nbsp; // so in order to avoid double DPI scaling it must not be read twice (ticket 35575),<br>&nbsp;&nbsp;&nbsp; // however the value still must be read out to provide format backward compatibility (ticket 36079).<br>&nbsp;&nbsp;&nbsp; int nUnusedWidth = 0;<br>&nbsp;&nbsp;&nbsp; PX_DPI_X_Int(pPX, _T("Width"), nUnusedWidth, 0);<br>&nbsp;&nbsp;&nbsp; UNUSED(nUnusedWidth);<br>&nbsp;&nbsp;&nbsp; ...<br><br>is not correct, once again.<br>In XTP1700<br>PX_DPI_X_Int(pPX, _T("Width"), m_nWidth, 0) was called twice; the two writes did no harm but the two reads somehow changed the member in case of HighDPI (when XTP_DPI_X returns a modified value)<br><br>In XTP1801<br>PX_DPI_X_Int(pPX, _T("Width"), m_nWidth, 0) was called only once (in the base class) and for us, everything was fine (serializing to XML)<br><br>In XTP1820<br>- PX_DPI_X_Int(pPX, _T("Width"), m_nWidth, 0) is called in the base class<br>- PX_DPI_X_Int(pPX, _T("Width"), nUnusedWidth, 0) is called again in CXTPControlComboBox::DoPropExchange<br>Now writing is buggy: <br>- the base class (CXTPControl) writes e.g. Width=150 into xml<br>- the derived class (CXTPControlComboBox) writes Width=0 into xml and... gone is the 150<br><br>My guess is the code in the derived class should only be called in the read case (IsLoading=true)<br><br>I would appreciate it very much if the bug was fixed in the next version.<br><br>Thank you and best regards,<br>Michael<br>]]>
   </description>
   <pubDate>Wed, 06 Dec 2017 12:01:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76378&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76378</guid>
  </item> 
  <item>
   <title><![CDATA[[solved]wrong serialization in CXTPControlComboBox : Ive done some, and it seems that...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76376&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76376</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8921">jis</a><br /><strong>Subject:</strong> 23508<br /><strong>Posted:</strong> 06 December 2017 at 8:04am<br /><br />Ive done some, and it seems that if we do not load commandbars on launch, then the CXTPControlComboBox have a width that normal. <br />But when we load the commandbars the CXTPControlComboBox have a width of 0. <br />It looks like all combos in the XML file look like this:<br /><table width="99%"><tr><td><pre class="BBcode"><br />&lt;Control Class="CXTPControlComboBox" Type="5" Id="7005" HideFlags="128" TooltipText="Control Text" Width="0" Height="0" CommandBarId="16777260" DropDown="0"/&gt;<br /></pre></td></tr></table> while in 16.4 of CodeJock this combobox would have Width="128".<br /><br />Possibly related to: <a href="http://forum.codejock.com/forum_posts.asp?TID=23508&KW=ComboBox&title=1820-wr&#111;ng-serializati&#111;n-in-cxtpc&#111;ntrolcombobox" rel="nofollow">http://forum.codejock.com/forum_posts.asp?TID=23508&KW=ComboBox&title=1820-wrong-serialization-in-cxtpcontrolcombobox</a> ?]]>
   </description>
   <pubDate>Wed, 06 Dec 2017 08:04:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76376&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76376</guid>
  </item> 
  <item>
   <title><![CDATA[[solved]wrong serialization in CXTPControlComboBox : We have seen a similar issue with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76368&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76368</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8921">jis</a><br /><strong>Subject:</strong> 23508<br /><strong>Posted:</strong> 05 December 2017 at 11:03am<br /><br />We have seen a similar issue with 18.2.0 where ComboBoxes have almost no width.]]>
   </description>
   <pubDate>Tue, 05 Dec 2017 11:03:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76368&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76368</guid>
  </item> 
  <item>
   <title><![CDATA[[solved]wrong serialization in CXTPControlComboBox : In save mode (schema _XTP_SCHEMA_1700),...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76332&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76332</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5158">lrenoux</a><br /><strong>Subject:</strong> 23508<br /><strong>Posted:</strong> 28 November 2017 at 4:29am<br /><br /><div>In save mode (schema _XTP_SCHEMA_1700), the code below is wrong, "Width" will always be saved with 0.</div><div><div><br></div><div>void CXTPControlComboBox::DoPropExchange(CXTPPropExchange* pPX)</div><div>{</div><div><span style="white-space:pre">	</span>CXTPControlPopup::DoPropExchange(pPX);</div><div><br></div><div><span style="white-space:pre">	</span>PX_Bool(pPX, _T("DropDown"), m_bDropDown, TRUE);</div><div><br></div><div><span style="white-space:pre">	</span>// The Width property is already serialized in CXTPControl</div><div><span style="white-space:pre">	</span>// so in order to avoid double DPI scaling it must not be read twice (ticket 35575),</div><div><span style="white-space:pre">	</span>// however the value still must be read out to provide format backward compatibility (ticket 36079).</div><div><span style="white-space:pre">	</span>int nUnusedWidth = 0;</div><div><span style="white-space:pre">	</span>PX_DPI_X_Int(pPX, _T("Width"), nUnusedWidth, 0);</div><div><span style="white-space:pre">	</span>UNUSED(nUnusedWidth);</div></div><div><br></div><div>Introduced in version 18.2. I don't understand the comment.</div><div><br></div><div><br></div><div>L.</div>]]>
   </description>
   <pubDate>Tue, 28 Nov 2017 04:29:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23508&amp;PID=76332&amp;title=solvedwrong-serialization-in-cxtpcontrolcombobox#76332</guid>
  </item> 
 </channel>
</rss>