<?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 : auto shrink the CXTPC&#111;ntrolCombox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : auto shrink the CXTPC&#111;ntrolCombox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 13:49:46 +0000</pubDate>
  <lastBuildDate>Tue, 05 Jul 2005 06:39:33 +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=2487</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[auto shrink the CXTPC&#111;ntrolCombox : It work, Thanks very much for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7473&amp;title=auto-shrink-the-cxtpcontrolcombox#7473</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=574">blueseaing</a><br /><strong>Subject:</strong> 2487<br /><strong>Posted:</strong> 05 July 2005 at 6:39am<br /><br /><P>It work, Thanks very much for your help.</P>]]>
   </description>
   <pubDate>Tue, 05 Jul 2005 06:39:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7473&amp;title=auto-shrink-the-cxtpcontrolcombox#7473</guid>
  </item> 
  <item>
   <title><![CDATA[auto shrink the CXTPC&#111;ntrolCombox : Hi, try to patch yourself: 1....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7467&amp;title=auto-shrink-the-cxtpcontrolcombox#7467</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2487<br /><strong>Posted:</strong> 05 July 2005 at 5:54am<br /><br /><P>Hi, try to patch yourself:</P><P>1. add </P><FONT size=2><P>xtpFlagStretchedShared = 0x100000 </FONT><FONT color=#008000 size=2>// Bar is stretched, but not fill whole row</FONT></P><P><FONT color=#000000 size=2>2. Replace this member:</FONT></P><FONT color=#008000 size=2><FONT size=2><P><FONT color=#000000>int</FONT></FONT><FONT color=#000000><FONT size=2> CXTPDockBar::_AdjustRow(CToolBarArray&amp; arrRow, CPoint pt, </FONT><FONT size=2>int</FONT></FONT><FONT size=2><FONT color=#000000> nLength, BOOL bHorz, AFX_SIZEPARENTPARAMS* lpLayout, int&amp; nRemove)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CXTPDockInfoArray arrInfo;</FONT></P><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nPos;</FONT></P><P></FONT><FONT size=2><FONT color=#000000>// Step 1. Getting maximum available size;</FONT></P></FONT><FONT size=2><P></FONT><FONT color=#000000 size=2>for</FONT><FONT size=2><FONT color=#000000> (nPos = 0; nPos &lt; arrRow.GetSize(); nPos++)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CXTPToolBar* pBar = arrRow&#091;nPos&#093;;</FONT></P><P><FONT color=#000000>CSize sizeBar = pBar-&gt;CalcDockingLayout(nLength, _GetMode(bHorz, pBar));</FONT></P><P><FONT color=#000000>CPoint p = bHorz? CPoint(pBar-&gt;m_pDockContext-&gt;m_rectMRUDockPos.left, pt.y):</FONT></P><P><FONT color=#000000>CPoint(pt.x, pBar-&gt;m_pDockContext-&gt;m_rectMRUDockPos.top);</FONT></P><P><FONT color=#000000>XTP_DOCK_INFO dockInfo(pBar, CRect(p, sizeBar), nPos);</FONT></P><P><FONT color=#000000>arrInfo.Add(dockInfo);</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>ASSERT(arrInfo.GetSize() == arrRow.GetSize());</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (!bHorz) arrInfo.InvertRects();</FONT></P><P><FONT color=#000000>arrInfo.Sort();</FONT></P><P></FONT><FONT size=2><FONT color=#000000>// Step 2. if Total length is more than available, fill empty area.</FONT></P></FONT><FONT size=2><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nIndex = -1;</FONT></P><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nLen = 0; BOOL bMove = TRUE;</FONT></P><P></FONT><FONT color=#000000 size=2>for</FONT><FONT size=2><FONT color=#000000> (nPos = 0; nPos &lt; arrInfo.GetSize(); nPos++ )</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CRect&amp; rect = arrInfo&#091;nPos&#093;.rcBar;</FONT></P><P><FONT color=#000000>bMove = (rect.left &lt; nLen &amp;&amp; (nIndex &lt; arrInfo&#091;nPos&#093;.nIndex || bMove));</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (bMove) rect.OffsetRect(nLen - rect.left, 0);</FONT></P><P><FONT color=#000000>nLen = rect.right;</FONT></P><P><FONT color=#000000>nIndex = arrInfo&#091;nPos&#093;.nIndex;</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>nLen = nLength; nIndex = -1; bMove = TRUE;</FONT></P><P></FONT><FONT color=#000000><FONT size=2>for</FONT><FONT size=2> (nPos = (</FONT><FONT size=2>int</FONT></FONT><FONT size=2><FONT color=#000000>)arrInfo.GetSize() - 1; nPos &gt;= 0; nPos--)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CRect&amp; rect = arrInfo&#091;nPos&#093;.rcBar;</FONT></P><P><FONT color=#000000>bMove = (rect.right - nLen &gt; 0 &amp;&amp; (nIndex &lt; arrInfo&#091;nPos&#093;.nIndex || bMove));</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (bMove) rect.OffsetRect(nLen - rect.right, 0);</FONT></P><P><FONT color=#000000>nLen = rect.left;</FONT></P><P><FONT color=#000000>nIndex = arrInfo&#091;nPos&#093;.nIndex;</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>nLen = 0;</FONT></P><P></FONT><FONT color=#000000 size=2>for</FONT><FONT size=2><FONT color=#000000> (nPos = 0; nPos &lt; arrInfo.GetSize(); nPos++ )</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CRect&amp; rect = arrInfo&#091;nPos&#093;.rcBar;</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (rect.left &lt; nLen)</FONT></P><P><FONT color=#000000>rect.OffsetRect(nLen - rect.left, 0);</FONT></P><P><FONT color=#000000>nLen = rect.left + rect.Width();</FONT></P><P><FONT color=#000000>}</FONT></P><P></FONT><FONT size=2><FONT color=#000000>// Step 3. if Total length is more than available, make it expandable.</FONT></P></FONT><FONT size=2><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (nLen &gt; nLength)</FONT></P><P><FONT color=#000000>{</FONT></P><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nSum = 0;</FONT></P><P></FONT><FONT color=#000000 size=2>for</FONT><FONT size=2><FONT color=#000000> (nPos = 0; nPos &lt; arrInfo.GetSize(); nPos++ )</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CXTPToolBar* pBar = arrInfo&#091;nPos&#093;.pBar;</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (!(_GetMode(bHorz, pBar) &amp; LM_HIDEWRAP))</FONT></P><P><FONT color=#000000>arrInfo&#091;nPos&#093;.nMinWidth = nLength;</FONT></P><P></FONT><FONT size=2><FONT color=#000000>else</FONT></P></FONT><FONT size=2><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CSize sz = pBar-&gt;CalcDockingLayout(1, _GetMode(bHorz, pBar));</FONT></P><P><FONT color=#000000>arrInfo&#091;nPos&#093;.nMinWidth = bHorz? sz.cx: sz.cy;</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>arrInfo&#091;nPos&#093;.nTotlaMinWidth = nSum;</FONT></P><P><FONT color=#000000>nSum += arrInfo&#091;nPos&#093;.nMinWidth;</FONT></P><P><FONT color=#000000>}</FONT></P><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nLen = nLength;</FONT></P><P></FONT><FONT color=#000000><FONT size=2>for</FONT><FONT size=2> (nPos = (</FONT><FONT size=2>int</FONT></FONT><FONT size=2><FONT color=#000000>)arrInfo.GetSize() - 1; nPos &gt;= 0; nPos--)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CRect&amp; rect = arrInfo&#091;nPos&#093;.rcBar;</FONT></P><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nLeft = bHorz? arrInfo&#091;nPos&#093;.rcMRUPos.left: arrInfo&#091;nPos&#093;.rcMRUPos.top;</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (nLeft &gt;rect.left) nLeft = rect.left;</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (nLeft &lt; nLen - rect.Width()) nLeft = nLen - rect.Width();</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (nLeft &lt; arrInfo&#091;nPos&#093;.nTotlaMinWidth) nLeft = arrInfo&#091;nPos&#093;.nTotlaMinWidth;</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (nLen - nLeft &lt; arrInfo&#091;nPos&#093;.nMinWidth) nLeft = nLen - arrInfo&#091;nPos&#093;.nMinWidth;</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> ((nLen - nLeft &lt; arrInfo&#091;nPos&#093;.nMinWidth || nLeft &lt; arrInfo&#091;nPos&#093;.nTotlaMinWidth)</FONT></P><P><FONT color=#000000>&amp;&amp; arrInfo.GetSize() != 1)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>nRemove = arrInfo&#091;arrInfo.GetSize() - 1&#093;.nIndex;</FONT></P><P></FONT><FONT color=#000000 size=2>return</FONT><FONT size=2><FONT color=#000000> 0;</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>rect.right = nLen;</FONT></P><P><FONT color=#000000>nLen = rect.left = max(0, nLeft);</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>}</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (!bHorz) arrInfo.InvertRects();</FONT></P><P><FONT color=#000000></FONT>&nbsp;</P><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nWidth = 0;</FONT></P><P></FONT><FONT size=2><FONT color=#000000>// Calculate total width</FONT></P></FONT><FONT size=2><P></FONT><FONT color=#000000 size=2>for</FONT><FONT size=2><FONT color=#000000> (nPos = 0; nPos &lt; arrInfo.GetSize(); nPos++)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CXTPToolBar* pBar = arrInfo&#091;nPos&#093;.pBar;</FONT></P><P><FONT color=#000000>CRect&amp; rect = arrInfo&#091;nPos&#093;.rcBar;</FONT></P><P><FONT color=#000000>CSize sizeBar = pBar-&gt;CalcDockingLayout(bHorz? rect.Width(): rect.Height(), _GetMode(bHorz, pBar));</FONT></P><P><FONT color=#000000>nWidth = max(nWidth, bHorz? sizeBar.cy: sizeBar.cx);</FONT></P><P><FONT color=#000000>}</FONT></P><P></FONT><FONT size=2><FONT color=#000000>// Step 4. Move it.</FONT></P></FONT><FONT size=2><P></FONT><FONT color=#000000 size=2>for</FONT><FONT size=2><FONT color=#000000> (nPos = 0; nPos &lt; arrInfo.GetSize(); nPos++)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>CXTPToolBar* pBar = arrInfo&#091;nPos&#093;.pBar;</FONT></P><P><FONT color=#000000>CRect&amp; rect = arrInfo&#091;nPos&#093;.rcBar;</FONT></P><P></FONT><FONT color=#000000 size=2>int</FONT><FONT size=2><FONT color=#000000> nMode = _GetMode(bHorz, pBar) | LM_COMMIT;</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (pBar-&gt;GetFlags() &amp; xtpFlagStretchedShared)</FONT></P><P><FONT color=#000000>{</FONT></P><P></FONT><FONT color=#000000 size=2>if</FONT><FONT size=2><FONT color=#000000> (bHorz)</FONT></P><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>rect.right = nPos == arrInfo.GetSize() - 1? nLength: arrInfo&#091;nPos + 1&#093;.rcBar.left;</FONT></P><P><FONT color=#000000>rect.left = nPos == 0? 0: min(arrInfo&#091;nPos - 1&#093;.rcBar.right, rect.left);</FONT></P><P><FONT color=#000000>}</FONT></P><P></FONT><FONT size=2><FONT color=#000000>else</FONT></P></FONT><FONT size=2><P><FONT color=#000000>{</FONT></P><P><FONT color=#000000>rect.bottom = nPos == arrInfo.GetSize() - 1? nLength: arrInfo&#091;nPos + 1&#093;.rcBar.top;</FONT></P><P><FONT color=#000000>rect.top = nPos == 0? 0: min(arrInfo&#091;nPos - 1&#093;.rcBar.bottom, rect.top);</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>nMode |= LM_STRETCH;</FONT></P><P><FONT color=#000000>}</FONT></P><P><FONT color=#000000>CSize sz = pBar-&gt;CalcDockingLayout(bHorz? rect.Width(): rect.Height(), nMode, nWidth );</FONT></P><P><FONT color=#000000>rect = CRect(rect.TopLeft(), sz);</FONT></P><P><FONT color=#000000>pBar-&gt;m_pDockContext-&gt;m_uMRUDockPosition= GetPosition();</FONT></P><P><FONT color=#000000>AfxRepositionWindow(lpLayout, pBar-&gt;m_hWnd, &amp;rect);</FONT></P><P><FONT color=#000000>pBar-&gt;Invalidate(FALSE);</FONT></P><P><FONT color=#000000>}</FONT></P><P></FONT><FONT color=#000000 size=2>return</FONT><FONT size=2><FONT color=#000000> nWidth;</FONT></P><P><FONT color=#000000>}</FONT></P></FONT></FONT>]]>
   </description>
   <pubDate>Tue, 05 Jul 2005 05:54:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7467&amp;title=auto-shrink-the-cxtpcontrolcombox#7467</guid>
  </item> 
  <item>
   <title><![CDATA[auto shrink the CXTPC&#111;ntrolCombox : but my version is 9.6,can you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7448&amp;title=auto-shrink-the-cxtpcontrolcombox#7448</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=574">blueseaing</a><br /><strong>Subject:</strong> 2487<br /><strong>Posted:</strong> 04 July 2005 at 5:37am<br /><br />but my version is 9.6,&nbsp;can you give me a hot fix&nbsp;to support &nbsp;the xtpFlagStretchedShared flag, my project is so hopeful for the feature. Thanks a lot.]]>
   </description>
   <pubDate>Mon, 04 Jul 2005 05:37:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7448&amp;title=auto-shrink-the-cxtpcontrolcombox#7448</guid>
  </item> 
  <item>
   <title><![CDATA[auto shrink the CXTPC&#111;ntrolCombox : Hi, in 9.70 was added xtpFlagStretchedShared, use...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7421&amp;title=auto-shrink-the-cxtpcontrolcombox#7421</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 2487<br /><strong>Posted:</strong> 03 July 2005 at 11:29pm<br /><br /><P>Hi,</P><P>in 9.70 was added xtpFlagStretchedShared,</P><P>use it instead xtpFlagStretched for your toolbar</P>]]>
   </description>
   <pubDate>Sun, 03 Jul 2005 23:29:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7421&amp;title=auto-shrink-the-cxtpcontrolcombox#7421</guid>
  </item> 
  <item>
   <title><![CDATA[auto shrink the CXTPC&#111;ntrolCombox : When a CXtpControlCombox set xtpFlagStretchedflag,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7392&amp;title=auto-shrink-the-cxtpcontrolcombox#7392</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=574">blueseaing</a><br /><strong>Subject:</strong> 2487<br /><strong>Posted:</strong> 01 July 2005 at 3:29am<br /><br />&nbsp;&nbsp;&nbsp; When a CXtpControlCombox set xtpFlagStretched&nbsp;flag, it will fill the toolbar, but when I try to drag another toolbar to the row of the stretched toolbar, I can't. How to auto shrink the CXtpControlCombox size before drag the toolbar?]]>
   </description>
   <pubDate>Fri, 01 Jul 2005 03:29:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2487&amp;PID=7392&amp;title=auto-shrink-the-cxtpcontrolcombox#7392</guid>
  </item> 
 </channel>
</rss>