<?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 : OnUpdateRibbonTab</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : OnUpdateRibbonTab]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 11:30:29 +0000</pubDate>
  <lastBuildDate>Fri, 26 Jun 2009 05:23:30 +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=14610</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[OnUpdateRibbonTab : This scenario works for me.  In...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14610&amp;PID=50333&amp;title=onupdateribbontab#50333</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 14610<br /><strong>Posted:</strong> 26 June 2009 at 5:23am<br /><br />This scenario works for me.<DIV>&nbsp;</DIV><DIV>In Main Frame add</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>void CMainFrame::OnUpdateRibbonTab(CCmdUI* pCmdUI)<BR>{<BR>&nbsp;CXTPRibbonControlTab* pControl = DYNAMIC_DOWNCAST(CXTPRibbonControlTab, CXTPControl::FromUI(pCmdUI));<BR>&nbsp;if (!pControl)<BR>&nbsp;&nbsp;return;</DIV><DIV>&nbsp;CXTPRibbonTab* pTab = pControl-&gt;FindTab(ID_TAB_EDIT);<BR>&nbsp;if (!pTab)<BR>&nbsp;&nbsp;return;</DIV><DIV>&nbsp;pTab-&gt;SetVisible( FALSE );<BR>}</DIV><DIV>&nbsp;</DIV><DIV>in your view</DIV><DIV>&nbsp;</DIV><DIV>void CRibbonMDISampleView::OnUpdateRibbonTab(CCmdUI* pCmdUI)<BR>{<BR>&nbsp;CXTPRibbonControlTab* pControl = DYNAMIC_DOWNCAST(CXTPRibbonControlTab, CXTPControl::FromUI(pCmdUI));<BR>&nbsp;if (!pControl)<BR>&nbsp;&nbsp;return;<BR>&nbsp;<BR>&nbsp;CXTPRibbonTab* pTab = pControl-&gt;FindTab(ID_TAB_EDIT);<BR>&nbsp;if (!pTab)<BR>&nbsp;&nbsp;return;<BR>&nbsp;<BR>&nbsp;pTab-&gt;SetVisible(TRUE);<BR>}<BR></DIV><DIV>now Tab is visible only when View is active.</DIV>]]>
   </description>
   <pubDate>Fri, 26 Jun 2009 05:23:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14610&amp;PID=50333&amp;title=onupdateribbontab#50333</guid>
  </item> 
  <item>
   <title><![CDATA[OnUpdateRibbonTab : Big problems in version 12. Have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14610&amp;PID=50266&amp;title=onupdateribbontab#50266</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2024">MGebler</a><br /><strong>Subject:</strong> 14610<br /><strong>Posted:</strong> 24 June 2009 at 11:03am<br /><br />Big problems in version 12. Have a look at your RibbonMDI sample an insert the highlighted line<br><font face="Courier New, Courier, mono"><br>void CMainFrame::OnUpdateRibbonTab(CCmdUI* pCmdUI)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPRibbonControlTab* pControl = DYNAMIC_DOWNCAST(CXTPRibbonControlTab, CXTPControl::FromUI(pCmdUI));<br>&nbsp;&nbsp;&nbsp; if (!pControl)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp; CXTPRibbonTab* pTab = pControl-&gt;FindTab(ID_TAB_EDIT);<br>&nbsp;&nbsp;&nbsp; if (!pTab)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br><br>&nbsp;&nbsp;&nbsp; <font color="#0000ff">pTab-&gt;SetVisible( FALSE );<br><br><font color="#006600">&nbsp;&nbsp;&nbsp; // ...</font><br><br></font>&nbsp;&nbsp;&nbsp; pTab-&gt;SetVisible(MDIGetActive() != NULL);<br>}<br></font><br>Try to select the EDIT Tab -&gt; Nothing happens. <br><br>And now the real life problem. In my MDI-application the childframes decide whether a tab or group is visible or not. Therefore I have to hide all ribbon tabs and groups; dispatch the update command to the views of a child frame, andf if one of these views is responsible for the command they show the tab/group (SetVisible(TRUE), if they are not responsible they do nothing.<br><br>Plese help me<br><br><br><br>]]>
   </description>
   <pubDate>Wed, 24 Jun 2009 11:03:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14610&amp;PID=50266&amp;title=onupdateribbontab#50266</guid>
  </item> 
 </channel>
</rss>