<?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 : CXTListBox Horiz&#111;ntal Scroll Problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTListBox Horiz&#111;ntal Scroll Problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 21:42:04 +0000</pubDate>
  <lastBuildDate>Fri, 09 Sep 2005 13:38:57 +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=2864</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[CXTListBox Horiz&#111;ntal Scroll Problem : What do you know I got it fixed....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2864&amp;PID=8557&amp;title=cxtlistbox-horizontal-scroll-problem#8557</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=504">AliRafiee</a><br /><strong>Subject:</strong> 2864<br /><strong>Posted:</strong> 09 September 2005 at 1:38pm<br /><br /><P>What do you know I got it fixed.&nbsp;&nbsp; Of course I had to change the code in CXTListBox.&nbsp; The CRect that is being passed to CXTMemDC needed to be adjusted for the horizontal scroll to work correctly.</P><FONT color=#0000ff><P><FONT face="Arial, Helvetica, sans-serif" size=2>void</FONT></FONT><FONT face="Arial, Helvetica, sans-serif" size=2> CXTListBox::OnPaint()</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>{</FONT></P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P><FONT size=2><FONT face="Arial, Helvetica, sans-serif">CPaintDC dc(</FONT><FONT face="Arial, Helvetica, sans-serif" color=#0000ff>this</FONT><FONT face="Arial, Helvetica, sans-serif">);</FONT></FONT></P><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// Get the client rect.</FONT></P></FONT><P><FONT face="Arial, Helvetica, sans-serif" size=2>CRect r;</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>GetClientRect(&amp;r);</FONT></P><P><FONT face=Arial color=#ff0000 size=2>//adjust the rect for the horizontal scroll</FONT></P><FONT size=2><P><FONT color=#ff0000>r.right += GetScrollPos(SB_HORZ);</FONT></P><P><FONT color=#ff0000>r.OffsetRect(-GetScrollPos(SB_HORZ),0);</FONT></P></FONT><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// determine the background color.</FONT></P></FONT><P><FONT face="Arial, Helvetica, sans-serif" size=2>COLORREF clrWindow = IsWindowEnabled() ?</FONT></P><P><FONT face="Arial, Helvetica, sans-serif" size=2>xtAfxData.clrWindow : xtAfxData.clr3DFace;</FONT></P><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// Paint to a memory device context to reduce screen flicker.</FONT></P></FONT><P><FONT face="Arial, Helvetica, sans-serif" size=2>CXTMemDC memDC(&amp;dc, r, clrWindow);</FONT></P><P><FONT color=#008000><FONT face="Arial, Helvetica, sans-serif" size=2>// Let the window do its default painting...</FONT></P></FONT><P><FONT face="Arial, Helvetica, sans-serif" size=2>CListBox::DefWindowProc( WM_PAINT, (WPARAM)memDC.m_hDC, 0 );</FONT></P></BLOCKQUOTE><P><FONT face="Arial, Helvetica, sans-serif" size=2>}</FONT></P><P><FONT face=Arial size=2></FONT>&nbsp;</P><P><FONT face=Arial size=2>Well that fixes the horizontal scroll in general.</FONT></P><P><FONT face=Arial size=2>Now to fix the black area showing up under the last item. </FONT></P><P><FONT face=Arial size=2>Change the SetRedraw calls in the SetRedrawEx to LockWindowUpdate and UnlockWindowUpdate calls. Obviously need a condition statment.</FONT></P><P><FONT face=Arial size=2>Ali</FONT></P><span style="font-size:10px"><br /><br />Edited by AliRafiee</span>]]>
   </description>
   <pubDate>Fri, 09 Sep 2005 13:38:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2864&amp;PID=8557&amp;title=cxtlistbox-horizontal-scroll-problem#8557</guid>
  </item> 
  <item>
   <title><![CDATA[CXTListBox Horiz&#111;ntal Scroll Problem : I am trying to get CXTListBox...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2864&amp;PID=8553&amp;title=cxtlistbox-horizontal-scroll-problem#8553</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=504">AliRafiee</a><br /><strong>Subject:</strong> 2864<br /><strong>Posted:</strong> 09 September 2005 at 1:06pm<br /><br /><P>I am trying to get CXTListBox to work correctly with Horizontal scroll.&nbsp; </P><P>What I did&nbsp;was create my CXTListBox with the WS_HSCORLL and then called SetHorizontalExtent(some large number).&nbsp; When I scroll the listbox horizontally it leaves garbege on the screen, and if there not enough items to fill the list vertically it will leave a black area below the last item.<IMG src="http://forum.codejock.com/smileys/smiley11.gif" border="0">&nbsp; Any ideas?</P><P>Thanks</P><P>Ali</P>]]>
   </description>
   <pubDate>Fri, 09 Sep 2005 13:06:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2864&amp;PID=8553&amp;title=cxtlistbox-horizontal-scroll-problem#8553</guid>
  </item> 
 </channel>
</rss>