<?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 : CommandBar-&gt;Width</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CommandBar-&gt;Width]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 14:51:29 +0000</pubDate>
  <lastBuildDate>Fri, 05 Dec 2008 02:34:13 +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=12840</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[CommandBar-&gt;Width : Hi,  After you add button Add...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43440&amp;title=commandbarwidth#43440</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 05 December 2008 at 2:34am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>After you add button Add </DIV><DIV>m_spCommandBars-&gt;RecalcLayout();</DIV><DIV>to allow commandbars reclculate positions of new controls.</DIV>]]>
   </description>
   <pubDate>Fri, 05 Dec 2008 02:34:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43440&amp;title=commandbarwidth#43440</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : From the WTL Sample shipped with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43427&amp;title=commandbarwidth#43427</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4382">Number8</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 04 December 2008 at 12:47pm<br /><br />From the WTL Sample shipped with v12.1.0:<br /><table width="99%"><tr><td><pre class="BBcode"><br />m_spCommandBars-&gt;LoadDesignerBars(_variant_t((long)IDR_COMMANDBARS), _variant_t((long)_Module.m_hInstResource));<br /><br />m_spCommandBars-&gt;LoadCommandBars(_bstr_t("Codejock Software ActiveX Demos"), _bstr_t("WTLSample"), _bstr_t("Layout"));<br /><br />m_spCommandBars-&gt;ScaleMode = XtremeCommandBars::xtpScalePixel;<br /><font color=GREEN>// My additions to test GetRect().</font><br />ICommandBar * pBar;<br />long cnt;<br />pBar = m_spCommandBars-&gt;GetItem(2);<br /><br /><br />ICommandBarControl * pControl;<br />ICommandBarControls * pControls = pBar-&gt;GetControls();<br />cnt = pControls-&gt;GetCount();<br /><br />long t, l, b, r;<br />for (int j = 1; j &lt;= cnt; ++j) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pControl = pControls-&gt;GetItem(j);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pControl-&gt;GetRect(&l,  &t,  &r,  &b);<br /><font color=GREEN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// l = 10, t = 2, r = 32, b = 24<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// l & r increment by 22, as expected</font><br />}<br />pControl = pControls-&gt;Add(xtpControlButton, 101, "Hi");<br />if (0 != pControl) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pControl-&gt;GetRect(&l,  &t,  &r,  &b);<br />}<br /><font color=GREEN>// l = t = r = b = 0</font><br /><br />pControl = pControls-&gt;Find(xtpControlButton, 101);<br />if (0 != pControl) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pControl-&gt;GetRect(&l,  &t,  &r,  &b);<br />}<br /><font color=GREEN>// l = t = r = b = 0</font><br /></pre></td></tr></table><br />Frustrating.]]>
   </description>
   <pubDate>Thu, 04 Dec 2008 12:47:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43427&amp;title=commandbarwidth#43427</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : I mean this border has always...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43424&amp;title=commandbarwidth#43424</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 04 December 2008 at 10:11am<br /><br />I mean this border has always same length. So just check this value.<DIV></DIV>]]>
   </description>
   <pubDate>Thu, 04 Dec 2008 10:11:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43424&amp;title=commandbarwidth#43424</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : Any idea why pControl-&amp;gt;GetRect(&amp;amp;a,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43421&amp;title=commandbarwidth#43421</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4382">Number8</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 04 December 2008 at 8:11am<br /><br /><P>Any idea why pControl-&gt;GetRect(&amp;a, &amp;b, &amp;c, &amp;d) fills all params with 0?</P><DIV>"make screenshot and calculate" is hard to do at runtime...</DIV>]]>
   </description>
   <pubDate>Thu, 04 Dec 2008 08:11:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43421&amp;title=commandbarwidth#43421</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : Hi, yes, it will be depend. Just...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43416&amp;title=commandbarwidth#43416</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 04 December 2008 at 7:24am<br /><br />Hi,<DIV>yes, it will be depend. Just make screenshot and calculate it :)</DIV>]]>
   </description>
   <pubDate>Thu, 04 Dec 2008 07:24:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43416&amp;title=commandbarwidth#43416</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width :   Width = (22 * 3 + border_width) Will...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43401&amp;title=commandbarwidth#43401</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4382">Number8</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 03 December 2008 at 1:17pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> Width = (22 * 3 + border_width)</td></tr></table><br />Will '22' change, depending on whether large or small icons are used?<br />Where does border_width come from?<br /><table width="99%"><tr><td><pre class="BBcode"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HWND hwnd = (HWND) pToolbar-&gt;GethWnd();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wi.cbSize = sizeof(WINDOWINFO);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetWindowInfo(hwnd,  &wi);<br /></pre></td></tr></table><br />Surprisingly, all the size fields, such as cxWindowBorders, are 0...<br /><br />(I confirmed with Spy++ that the hwnd variable is indeed the toolbar's HWND.)]]>
   </description>
   <pubDate>Wed, 03 Dec 2008 13:17:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43401&amp;title=commandbarwidth#43401</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : Thanks for the reply.  Just to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43400&amp;title=commandbarwidth#43400</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4382">Number8</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 03 December 2008 at 12:27pm<br /><br />Thanks for the reply.<br /><br />Just to clarify, did you mean use the GetRect() method?  There is no Size property on the CommandBarControl object...<br /><br />Nope, that's not the happenin' thing, either:<br />pControl = pControls-&gt;Add(xtpControlButton, nAction, "");<br />pControl-&gt;GetRect(&left, &top, &right, &bottom);<br /><br />left, top, right, bottom all equal 0.]]>
   </description>
   <pubDate>Wed, 03 Dec 2008 12:27:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43400&amp;title=commandbarwidth#43400</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : Hi, It doesn&amp;#039;t look like...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43396&amp;title=commandbarwidth#43396</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 03 December 2008 at 11:54am<br /><br /><P>Hi,</P><DIV>It doesn't look like ActiveX code :)</DIV><DIV>&nbsp;</DIV><DIV>GetWidth return "user" width. You nede call GetSize to get actual width or just use Width = (22 * 3 + border_width)</DIV>]]>
   </description>
   <pubDate>Wed, 03 Dec 2008 11:54:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43396&amp;title=commandbarwidth#43396</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : I am trying to set the width of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43392&amp;title=commandbarwidth#43392</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4382">Number8</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 03 December 2008 at 9:24am<br /><br />I am trying to set the width of a floating toolbar using "buttons" as the unit, as in "I would like my toolbar to be 3 buttons wide".<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />pControl = pControls-&gt;Add(xtpControlButton, nAction, "");<br />cntrlWidth = pControl-&gt;GetWidth();<br /></pre></td></tr></table><br /><br />cntrlWidth == 0.<br />How can I determine how wide, in pixels, a "3 button wide" toolbar is?<br /><br />]]>
   </description>
   <pubDate>Wed, 03 Dec 2008 09:24:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43392&amp;title=commandbarwidth#43392</guid>
  </item> 
  <item>
   <title><![CDATA[CommandBar-&gt;Width : Pixels. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43385&amp;title=commandbarwidth#43385</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12840<br /><strong>Posted:</strong> 03 December 2008 at 4:27am<br /><br />Pixels.]]>
   </description>
   <pubDate>Wed, 03 Dec 2008 04:27:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12840&amp;PID=43385&amp;title=commandbarwidth#43385</guid>
  </item> 
 </channel>
</rss>