<?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 : TrackControl overflow problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : TrackControl overflow problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 19 May 2026 05:24:17 +0000</pubDate>
  <lastBuildDate>Wed, 23 Jun 2010 05:02:22 +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=16855</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[TrackControl overflow problem : Thanks, replaced also. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59077&amp;title=trackcontrol-overflow-problem#59077</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 16855<br /><strong>Posted:</strong> 23 June 2010 at 5:02am<br /><br />Thanks, replaced also.]]>
   </description>
   <pubDate>Wed, 23 Jun 2010 05:02:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59077&amp;title=trackcontrol-overflow-problem#59077</guid>
  </item> 
  <item>
   <title><![CDATA[TrackControl overflow problem :  No problem. I also found a couple...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59063&amp;title=trackcontrol-overflow-problem#59063</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5402">Aaron Koolen</a><br /><strong>Subject:</strong> 16855<br /><strong>Posted:</strong> 21 June 2010 at 5:49pm<br /><br />No problem. I also found a couple of other places where the same thing occurs.<br><br>XTPrackPaintManager::DrawTrackHeader, around line 305.<br>XTPTrackHeader::OnLButtonDown, around line 418.<br><br>Both of those perform out of range multiplications.<br><br>Cheers<br>Aaron<br><br>]]>
   </description>
   <pubDate>Mon, 21 Jun 2010 17:49:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59063&amp;title=trackcontrol-overflow-problem#59063</guid>
  </item> 
  <item>
   <title><![CDATA[TrackControl overflow problem : Thanks, replaced to   int fromPosition...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59050&amp;title=trackcontrol-overflow-problem#59050</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 16855<br /><strong>Posted:</strong> 21 June 2010 at 9:24am<br /><br />Thanks, replaced to<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int fromPosition = MulDiv(m_ptStartDrag.x, (pControl-&gt;GetTimeLineMax() - pControl-&gt;GetTimeLineMin()), rcSliderArea.Width());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int toPosition = MulDiv(pt.x, (pControl-&gt;GetTimeLineMax() - pControl-&gt;GetTimeLineMin()), rcSliderArea.Width());<br />]]>
   </description>
   <pubDate>Mon, 21 Jun 2010 09:24:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59050&amp;title=trackcontrol-overflow-problem#59050</guid>
  </item> 
  <item>
   <title><![CDATA[TrackControl overflow problem : Hi there. I was getting strange...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59037&amp;title=trackcontrol-overflow-problem#59037</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5402">Aaron Koolen</a><br /><strong>Subject:</strong> 16855<br /><strong>Posted:</strong> 20 June 2010 at 11:17pm<br /><br />Hi there.<br />I was getting strange behaviour with my TrackControl where the slider would jump to the end of my time line range when I reached a certain position. I tracked the issue down to an overflow in the CXTPTrackControlHeader OnMoveSlider (~line 180) method.<br /><br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />int fromPosition = m_ptStartDrag.x * (pControl-&gt;GetTimeLineMax() - pControl-&gt;GetTimeLineMin()) / rcSliderArea.Width();<br />int toPosition = pt.x * (pControl-&gt;GetTimeLineMax() - pControl-&gt;GetTimeLineMin()) / rcSliderArea.Width();<br />int delta = toPosition - fromPosition;<br /></pre></td></tr></table><br /><br />With large timelines, as I had, the initial multiplication overflowed into negative. The fromPosition and toPosition can actually be removed and the delta performed before the multiplication and division. Even better would be to divide first, as I don't think the difference in rounding would matter. I have made the change in my code and all is working well.<br /><br />As an aside to this, I would suggest that  CXTPTrackControl handled unsigned.<br /><br />Aaron<br /><br />]]>
   </description>
   <pubDate>Sun, 20 Jun 2010 23:17:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16855&amp;PID=59037&amp;title=trackcontrol-overflow-problem#59037</guid>
  </item> 
 </channel>
</rss>