<?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 Selection Update</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : General Discussion : Ribbon Selection Update]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 28 Apr 2026 04:12:50 +0000</pubDate>
  <lastBuildDate>Wed, 25 Apr 2007 14:13:11 +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=6977</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 Selection Update : Hello,  yes, now this indeed...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6977&amp;PID=22318&amp;title=ribbon-selection-update#22318</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6977<br /><strong>Posted:</strong> 25 April 2007 at 2:13pm<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>yes, now this indeed problem of 11.1 release. Getselected always return -1 for popup galleries. Think it will be some maintaince release. Please write to support I will send you changed files to replace.</DIV><DIV>&nbsp;</DIV><DIV>Thanks.</DIV>]]>
   </description>
   <pubDate>Wed, 25 Apr 2007 14:13:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6977&amp;PID=22318&amp;title=ribbon-selection-update#22318</guid>
  </item> 
  <item>
   <title><![CDATA[Ribbon Selection Update : Hi, i attached my gallery control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6977&amp;PID=22312&amp;title=ribbon-selection-update#22312</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1940">BastianPL</a><br /><strong>Subject:</strong> 6977<br /><strong>Posted:</strong> 25 April 2007 at 12:45pm<br /><br />Hi, i attached my gallery control to ribbon bar. I have also "drop down gallery". But the problem is with selection. If i select item in smaller gallery and i click drop down button, in drop down gallery item is selected ok,&nbsp; but if i change selection in "bigger" gallery the selection in smaller gallery is still this same.<DIV>&nbsp;</DIV><DIV>Do YOU have any ideas ???</DIV><DIV>&nbsp;</DIV><DIV>There is my code:</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#008000 size=2><P><FONT size=1>/*************************************************************************************************************************************************************\</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* void OnFormatSelect( NMHDR *pNMHDR, LRESULT *pResult )</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* DESCRIPTION:</FONT></P><P><FONT size=1>* Called when users change the gallery selection </FONT></P><P><FONT size=1>* Changes the current selected Format</FONT></P><P><FONT size=1>* </FONT></P><P><FONT size=1>\*************************************************************************************************************************************************************/</FONT></P></FONT><FONT color=#0000ff><P><FONT size=1>void</FONT></FONT><FONT size=1> <FONT color=#010001>CMainFrame</FONT>::<FONT color=#010001>OnFormatSelect</FONT>( <FONT color=#010001>NMHDR</FONT> *<FONT color=#010001>pNMHDR</FONT>, <FONT color=#010001>LRESULT</FONT> *<FONT color=#010001>pResult</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#010001>NMXTPCONTROL</FONT>* <FONT color=#010001>tagNMCONTROL</FONT> = (<FONT color=#010001>NMXTPCONTROL</FONT> *)<FONT color=#010001>pNMHDR</FONT>;</FONT></P><P><FONT size=1><FONT color=#010001>CXTPControlGallery</FONT> *<FONT color=#010001>pGroup</FONT> = <FONT color=#010001>DYNAMIC_DOWNCAST</FONT>( <FONT color=#010001>CXTPControlGallery</FONT>, <FONT color=#010001>tagNMCONTROL</FONT>-&gt;<FONT color=#010001>pControl</FONT> );</FONT></P><P><FONT size=1><FONT color=#0000ff>if</FONT> ( <FONT color=#010001>pGroup</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#010001>CXTPControlGalleryItem</FONT> *<FONT color=#010001>pSelectedItem</FONT> = <FONT color=#010001>pGroup</FONT>-&gt;<FONT color=#010001>GetItem</FONT>( <FONT color=#010001>pGroup</FONT>-&gt;<FONT color=#010001>GetSelectedItem</FONT>() );</FONT></P><P><FONT size=1><FONT color=#0000ff>if</FONT> ( <FONT color=#010001>pSelectedItem</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#0000ff>int</FONT> <FONT color=#010001>nIndex</FONT> = <FONT color=#010001>pSelectedItem</FONT>-&gt;<FONT color=#010001>GetID</FONT>();</FONT></P><P><FONT size=1><FONT color=#010001>m_RibbonFormat</FONT>.<FONT color=#010001>SelectFormat</FONT>( <FONT color=#010001>m_RibbonFormat</FONT>.<FONT color=#010001>m_FormatGalleryControl</FONT>.<FONT color=#010001>GetName</FONT>( <FONT color=#010001>nIndex</FONT> ) );</FONT></P><P><FONT size=1>}</FONT></P><P><FONT size=1>*<FONT color=#010001>pResult</FONT> = <FONT color=#010001>TRUE</FONT>;</FONT></P><P><FONT size=1><FONT color=#0000ff>return</FONT>;</FONT></P><P><FONT size=1>}</FONT></P><P><FONT size=1>*<FONT color=#010001>pResult</FONT> = <FONT color=#010001>FALSE</FONT>;</FONT></P><P><FONT size=1>}</FONT></P><FONT color=#008000><P><FONT size=1>/*************************************************************************************************************************************************************\</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* void OnUpdateFormatSelect(CCmdUI *pCmdUI)</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* DESCRIPTION:</FONT></P><P><FONT size=1>* Update selected gallery state (selected Format)</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>\*************************************************************************************************************************************************************/</FONT></P></FONT><FONT color=#0000ff><P><FONT size=1>void</FONT></FONT><FONT size=1> <FONT color=#010001>CMainFrame</FONT>::<FONT color=#010001>OnUpdateFormatSelect</FONT>( <FONT color=#010001>CCmdUI</FONT> *<FONT color=#010001>pCmdUI</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#010001>CXTPControlGallery</FONT> *<FONT color=#010001>pGallery</FONT> = <FONT color=#010001>DYNAMIC_DOWNCAST</FONT>( <FONT color=#010001>CXTPControlGallery</FONT>, <FONT color=#010001>CXTPControl</FONT>::<FONT color=#010001>FromUI</FONT>( <FONT color=#010001>pCmdUI</FONT> ) );</FONT></P><P><FONT size=1><FONT color=#0000ff>if</FONT> ( <FONT color=#010001>pGallery</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#010001>CString</FONT> <FONT color=#010001>cs</FONT> = <FONT color=#010001>pGallery</FONT>-&gt;<FONT color=#010001>GetCaption</FONT>();</FONT></P><P><FONT size=1><FONT color=#0000ff>int</FONT> <FONT color=#010001>nSel</FONT> = <FONT color=#010001>m_nSelectedFormatPopupGallery</FONT>;</FONT></P><P><FONT size=1><FONT color=#010001>TRACE2</FONT> (<FONT color=#ff0000>" Selected pop-up gallery: %s = %d \n\r"</FONT>, <FONT color=#010001>cs</FONT>, <FONT color=#010001>nSel</FONT>);</FONT></P><P><FONT color=#008000><FONT size=1>//if ( m_nSelectedFormatPopupGallery != -1 )</FONT></P></FONT><P><FONT color=#008000><FONT size=1>//{</FONT></P></FONT><P><FONT color=#008000><FONT size=1>// int nSel = m_nSelectedFormatPopupGallery;</FONT></P></FONT><P><FONT color=#008000><FONT size=1>// TRACE1 (" Selected pop-up gallery: %d \n\r", nSel);</FONT></P></FONT><P><FONT color=#008000><FONT size=1>// //</FONT></P></FONT><P><FONT color=#008000><FONT size=1>// pGallery-&gt;SetCheckedItem( m_nSelectedFormatPopupGallery );</FONT></P></FONT><P><FONT color=#008000><FONT size=1>// pGallery-&gt;EnsureVisible( m_nSelectedFormatPopupGallery );</FONT></P></FONT><P><FONT color=#008000><FONT size=1>// m_nSelectedFormatPopupGallery = -1;</FONT></P></FONT><P><FONT color=#008000><FONT size=1>//}</FONT></P></FONT><P><FONT size=1>}</FONT></P><P><FONT size=1><FONT color=#010001>pCmdUI</FONT>-&gt;<FONT color=#010001>Enable</FONT>( <FONT color=#010001>TRUE</FONT> );</FONT></P><P><FONT size=1>}</FONT></P><FONT color=#008000><P><FONT size=1>/*************************************************************************************************************************************************************\</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* void OnFormatSelectGallery( NMHDR *pNMHDR, LRESULT *pResult )</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* DESCRIPTION:</FONT></P><P><FONT size=1>* Called when users change the Format selection </FONT></P><P><FONT size=1>* Changes the current selected Format</FONT></P><P><FONT size=1>* </FONT></P><P><FONT size=1>\*************************************************************************************************************************************************************/</FONT></P></FONT><FONT color=#0000ff><P><FONT size=1>void</FONT></FONT><FONT size=1> <FONT color=#010001>CMainFrame</FONT>::<FONT color=#010001>OnFormatSelectGallery</FONT>( <FONT color=#010001>NMHDR</FONT> *<FONT color=#010001>pNMHDR</FONT>, <FONT color=#010001>LRESULT</FONT> *<FONT color=#010001>pResult</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#010001>NMXTPCONTROL</FONT>* <FONT color=#010001>tagNMCONTROL</FONT> = (<FONT color=#010001>NMXTPCONTROL</FONT> *)<FONT color=#010001>pNMHDR</FONT>;</FONT></P><P><FONT size=1><FONT color=#010001>CXTPControlGallery</FONT> *<FONT color=#010001>pGroup</FONT> = <FONT color=#010001>DYNAMIC_DOWNCAST</FONT>( <FONT color=#010001>CXTPControlGallery</FONT>, <FONT color=#010001>tagNMCONTROL</FONT>-&gt;<FONT color=#010001>pControl</FONT> );</FONT></P><P><FONT size=1><FONT color=#0000ff>if</FONT> ( <FONT color=#010001>pGroup</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#0000ff>int</FONT> <FONT color=#010001>Idx</FONT> = <FONT color=#010001>pGroup</FONT>-&gt;<FONT color=#010001>GetSelectedItem</FONT>();</FONT></P><P><FONT size=1><FONT color=#010001>CXTPControlGalleryItem</FONT> *<FONT color=#010001>pSelectedItem</FONT> = <FONT color=#010001>pGroup</FONT>-&gt;<FONT color=#010001>GetItem</FONT>( <FONT color=#010001>Idx</FONT> );</FONT></P><P><FONT size=1><FONT color=#0000ff>if</FONT> ( <FONT color=#010001>pSelectedItem</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#0000ff>int</FONT> <FONT color=#010001>nID</FONT> = <FONT color=#010001>pSelectedItem</FONT>-&gt;<FONT color=#010001>GetID</FONT>();</FONT></P><P><FONT size=1><FONT color=#010001>m_RibbonFormat</FONT>.<FONT color=#010001>SelectFormat</FONT>( <FONT color=#010001>m_RibbonFormat</FONT>.<FONT color=#010001>m_FormatGalleryControl</FONT>.<FONT color=#010001>GetName</FONT>( <FONT color=#010001>nID</FONT> ) );</FONT></P><P><FONT size=1><FONT color=#010001>m_nSelectedFormatPopupGallery</FONT> = <FONT color=#010001>Idx</FONT>;</FONT></P><P><FONT size=1>}</FONT></P><P><FONT size=1>*<FONT color=#010001>pResult</FONT> = <FONT color=#010001>TRUE</FONT>;</FONT></P><P><FONT size=1><FONT color=#0000ff>return</FONT>;</FONT></P><P><FONT size=1>}</FONT></P><P><FONT size=1>*<FONT color=#010001>pResult</FONT> = <FONT color=#010001>FALSE</FONT>;</FONT></P><P><FONT size=1>}</FONT></P><FONT color=#008000><P><FONT size=1>/*************************************************************************************************************************************************************\</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* void OnUpdateFormatSelectGallery( CCmdUI *pCmdUI )</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>* DESCRIPTION:</FONT></P><P><FONT size=1>* Update selected gallery state (selected Format)</FONT></P><P><FONT size=1>*</FONT></P><P><FONT size=1>\*************************************************************************************************************************************************************/</FONT></P></FONT><FONT color=#0000ff><P><FONT size=1>void</FONT></FONT><FONT size=1> <FONT color=#010001>CMainFrame</FONT>::<FONT color=#010001>OnUpdateFormatSelectGallery</FONT>( <FONT color=#010001>CCmdUI</FONT> *<FONT color=#010001>pCmdUI</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#010001>CXTPControlGallery</FONT> *<FONT color=#010001>pGallery</FONT> = <FONT color=#010001>DYNAMIC_DOWNCAST</FONT>( <FONT color=#010001>CXTPControlGallery</FONT>, <FONT color=#010001>CXTPControl</FONT>::<FONT color=#010001>FromUI</FONT>( <FONT color=#010001>pCmdUI</FONT> ) );</FONT></P><P><FONT size=1><FONT color=#0000ff>if</FONT> ( <FONT color=#010001>pGallery</FONT> )</FONT></P><P><FONT size=1>{</FONT></P><P><FONT size=1><FONT color=#0000ff>int</FONT> <FONT color=#010001>nIndex</FONT> = <FONT color=#010001>m_RibbonFormat</FONT>.<FONT color=#010001>m_FormatGalleryControl</FONT>.<FONT color=#010001>Find</FONT>( <FONT color=#010001>m_RibbonFormat</FONT>.<FONT color=#010001>GetSelectedFormat</FONT>() );</FONT></P><P><FONT size=1><FONT color=#010001>pGallery</FONT>-&gt;<FONT color=#010001>SetCheckedItem</FONT>( <FONT color=#010001>nIndex</FONT> );</FONT></P><P><FONT size=1><FONT color=#010001>pGallery</FONT>-&gt;<FONT color=#010001>EnsureVisible</FONT>( <FONT color=#010001>nIndex</FONT> );</FONT></P><P><FONT size=1>}</FONT></P><P><FONT size=1><FONT color=#010001>pCmdUI</FONT>-&gt;<FONT color=#010001>Enable</FONT>( <FONT color=#010001>TRUE</FONT> );</FONT></P><P><FONT size=1>}</FONT><FONT size=2></P></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 25 Apr 2007 12:45:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6977&amp;PID=22312&amp;title=ribbon-selection-update#22312</guid>
  </item> 
 </channel>
</rss>