<?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 : Ribbon - some observations/suggestions</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Ribbon - some observations/suggestions]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 01:20:48 +0000</pubDate>
  <lastBuildDate>Wed, 21 Jun 2006 15:34:43 +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=4440</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[Ribbon - some observations/suggestions :   ijwelch wrote:If the end user...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13768&amp;title=ribbon-some-observations-suggestions#13768</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1755">ABuenger</a><br /><strong>Subject:</strong> 4440<br /><strong>Posted:</strong> 21 June 2006 at 3:34pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by ijwelch" alt="Originally posted by ijwelch" style="vertical-align: text-bottom;" /> <strong>ijwelch wrote:</strong><br /><br />If the end user can customize the toolbar then it's necessary to be able to find all instances of a tool.</td></tr></table><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Again, you should update your UI state using ON_UPDATE_COMMAND_UI handlers. That will automatically update all controls with the same id.</DIV><DIV>&nbsp;</DIV><DIV>You can even update a command range (ON_UPDATE_COMMAND_UI_RANGE) with a single handler.</DIV><DIV>&nbsp;</DIV><DIV>You <strong>should not</strong> call Enable/SetCheck methods of the controls because then you are tying your code to the XTP classes without the need of doing this.</DIV><DIV>&nbsp;</DIV><DIV>It shouldn't matter if a command is a menu item or or button on the Ribbon, the control takes care how to display its current state.</DIV><DIV>&nbsp;</DIV><DIV><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Message_Handling_and_Mapping_Topics.asp" target="_blank">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Message_Handling_and_Mapping_Topics.asp</A></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 21 Jun 2006 15:34:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13768&amp;title=ribbon-some-observations-suggestions#13768</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon - some observations/suggestions : &amp;#034;MFC updates the UI only...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13767&amp;title=ribbon-some-observations-suggestions#13767</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2113">ijwelch</a><br /><strong>Subject:</strong> 4440<br /><strong>Posted:</strong> 21 June 2006 at 3:14pm<br /><br />"MFC updates the UI only when it's in idle state, so nothing to worry about."<br><br>Ok.<br><br>"P.S.: You can also use <strong>FindControl</strong> to find a controlby id anywhere on the Ribbon. If you have a lot of duplicated commandson the Ribbon you might need to rethink your UI."<br><br>If the end user can customize the toolbar then it's necessary to be able to find all instances of a tool.<br><br>]]>
   </description>
   <pubDate>Wed, 21 Jun 2006 15:14:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13767&amp;title=ribbon-some-observations-suggestions#13767</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon - some observations/suggestions :   ijwelch wrote:Not a lot. Although...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13757&amp;title=ribbon-some-observations-suggestions#13757</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1755">ABuenger</a><br /><strong>Subject:</strong> 4440<br /><strong>Posted:</strong> 21 June 2006 at 9:20am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by ijwelch" alt="Originally posted by ijwelch" style="vertical-align: text-bottom;" /> <strong>ijwelch wrote:</strong><br /><br />Not a lot. Although it can lead to a waste of resources, more variables, etc. I like to run code to enable/disable controls when needed, not every 10ms or so.</td></tr></table> <DIV>&nbsp;</DIV><DIV>MFC updates the UI only when it's in idle state, so nothing to worry about.</DIV><DIV><BR><BR><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by ijwelch" alt="Originally posted by ijwelch" style="vertical-align: text-bottom;" /> <strong>ijwelch wrote:</strong><br /><br />The enabled property was just an example. Another common task would be to set the checked property. Right now, to do that, I've got to loop through every tab, every group, and every control.</td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>Call CCmdUi::SetCheck in the ON_UPDATE_COMMAND_UI handler.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>P.S.: You can also use <strong>FindControl</strong> to find a control by id anywhere on the Ribbon. If you have a lot of duplicated commands on the Ribbon you might need to rethink your UI <IMG height=17 alt=Wink src="http://forum.codejock.com/smileys/smiley2.gif" width=17 align=absMiddle border="0"></DIV>]]>
   </description>
   <pubDate>Wed, 21 Jun 2006 09:20:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13757&amp;title=ribbon-some-observations-suggestions#13757</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon - some observations/suggestions : Not a lot. Although it can lead...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13751&amp;title=ribbon-some-observations-suggestions#13751</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2113">ijwelch</a><br /><strong>Subject:</strong> 4440<br /><strong>Posted:</strong> 21 June 2006 at 2:17am<br /><br />Not a lot. Although it can lead to a waste of resources, more variables, etc. I like to run code to enable/disable controls when needed, not every 10ms or so.<br><br>The enabled property was just an example. Another common task would be to set the checked property. Right now, to do that, I've got to loop through every tab, every group, and every control.<br><br>A ControlsByID collection seems a pretty obvious requirement anyway considering the hierarchy of the control, and is probably implemented internally anyway.<br><br>]]>
   </description>
   <pubDate>Wed, 21 Jun 2006 02:17:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13751&amp;title=ribbon-some-observations-suggestions#13751</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon - some observations/suggestions :   ijwelch wrote:As a control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13730&amp;title=ribbon-some-observations-suggestions#13730</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1755">ABuenger</a><br /><strong>Subject:</strong> 4440<br /><strong>Posted:</strong> 20 June 2006 at 11:01am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by ijwelch" alt="Originally posted by ijwelch" style="vertical-align: text-bottom;" /> <strong>ijwelch wrote:</strong><br /><br />As a control can appear &gt;1 times on the ribbonbar object, it's a bit of a pain having to loop through RibbonTabs, followed by RibbonGroups, followed by Items, in order to (for example) set the enabled property for a particular control id. Perhaps we can have a method to retrieve a collection of CommandBarControls that share the same id? Or in this case, a RibbonBar.EnableControlsByID (ID) method?<BR></td></tr></table> <DIV>&nbsp;</DIV><DIV>What's wrong with ON_UPDATE_COMMAND_UI ?</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 20 Jun 2006 11:01:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13730&amp;title=ribbon-some-observations-suggestions#13730</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon - some observations/suggestions : Here&amp;#039;s some observations/suggestions...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13722&amp;title=ribbon-some-observations-suggestions#13722</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2113">ijwelch</a><br /><strong>Subject:</strong> 4440<br /><strong>Posted:</strong> 20 June 2006 at 5:18am<br /><br />Here's some observations/suggestions for the ribbonbar:<br><br>The QuickAccessControls item collection has a 1 based index, as opposed to the rest of the controls which are zero based.<br><br>As a control can appear &gt;1 times on the ribbonbar object, it's a bit of a pain having to loop through RibbonTabs, followed by RibbonGroups, followed by Items, in order to (for example) set the enabled property for a particular control id. Perhaps we can have a method to retrieve a collection of CommandBarControls that share the same id? Or in this case, a RibbonBar.EnableControlsByID (ID) method?<br><br>It'd be nice to have a Visible property on the QuickAccessControls object.<br><br>It'd also be nice to be able to hide tabs (eg if there's only one). By this I don't mean hide the entire tab, but just the bit you click on at the top.<br><br>Version 10.2 includes the system icon. The only way to get it visible is to use the EnableFrameTheme method. mmm. I want the icon/quick access bar to look like that but I don't want my form skinned.<br>]]>
   </description>
   <pubDate>Tue, 20 Jun 2006 05:18:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4440&amp;PID=13722&amp;title=ribbon-some-observations-suggestions#13722</guid>
  </item> 
 </channel>
</rss>