<?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 : Highlighting/Emphasizing Popup Entries</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Highlighting/Emphasizing Popup Entries]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 10 Jun 2026 22:57:33 +0000</pubDate>
  <lastBuildDate>Tue, 05 Feb 2008 01:46:01 +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=9408</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[Highlighting/Emphasizing Popup Entries : Vert dirty code. Easy to write...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9408&amp;PID=30800&amp;title=highlighting-emphasizing-popup-entries#30800</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 9408<br /><strong>Posted:</strong> 05 February 2008 at 1:46am<br /><br /><P>Vert dirty code. Easy to write new than fix your.</P><DIV></DIV>Here my solution:<DIV>&nbsp;</DIV><DIV><BR>CXTPControl* GetControlPath(int nID, CXTPControls* pControls, CPtrArray&amp; arr)<BR>{<BR>&nbsp;int nCount = pControls-&gt;GetCount();</DIV><DIV>&nbsp;for (int i = 0; i &lt; nCount; ++i)<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPControl* pControl = pControls-&gt;GetAt(i);</DIV><DIV>&nbsp;&nbsp;if(nID == pControl-&gt;GetID())<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;return pControl;<BR>&nbsp;&nbsp;}</DIV><DIV>&nbsp;&nbsp;if (pControl-&gt;GetCommandBar() != NULL)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;CXTPControl* p = GetControlPath(nID, pControl-&gt;GetCommandBar()-&gt;GetControls(), arr);<BR>&nbsp;&nbsp;&nbsp;if (p)<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;arr.InsertAt(0, pControl);<BR>&nbsp;&nbsp;&nbsp;&nbsp;return p;<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}&nbsp;&nbsp;<BR>&nbsp;}<BR>&nbsp;return NULL;<BR>}</DIV><DIV>CXTPControl* GetControlPath(CXTPCommandBars* pCommandBars, int nID, CPtrArray&amp; arr)<BR>{<BR>&nbsp;int nCount = pCommandBars-&gt;GetCount();<BR>&nbsp;for (int i = 0; i &lt; nCount; ++i)<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPToolBar* pBar = pCommandBars-&gt;GetAt(i);<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;CXTPControl* pControl = GetControlPath(nID, pBar-&gt;GetControls(), arr);<BR>&nbsp;&nbsp;if (pControl)<BR>&nbsp;&nbsp;&nbsp;return pControl;<BR>&nbsp;}</DIV><DIV>&nbsp;return NULL;<BR>}</DIV><DIV><BR>void CMainFrame::OnViewShowHide(UINT nID)<BR>{<BR>&nbsp;int CmdID = ID_EDIT_PASTE_SPECIAL;</DIV><DIV>&nbsp;CPtrArray arrPath;<BR>&nbsp;CXTPControl* pControl = GetControlPath(GetCommandBars(), CmdID, arrPath);<BR>&nbsp;if(!pControl) <BR>&nbsp;&nbsp;return;</DIV><DIV>&nbsp;for (int i = 0; i &lt; arrPath.GetSize(); i++)<BR>&nbsp;{<BR>&nbsp;&nbsp;CXTPControl* pControl = (CXTPControl*)arrPath.GetAt(i);</DIV><DIV>&nbsp;&nbsp;pControl-&gt;GetParent()-&gt;SetTrackingMode(TRUE, FALSE, TRUE);<BR>&nbsp;&nbsp;pControl-&gt;GetParent()-&gt;SetSelected(pControl-&gt;GetIndex(), TRUE);<BR>&nbsp;&nbsp;pControl-&gt;GetParent()-&gt;SetPopuped(pControl-&gt;GetIndex());<BR>&nbsp;}</DIV><DIV>&nbsp;pControl-&gt;GetParent()-&gt;SetTrackingMode(TRUE, FALSE, TRUE);<BR>&nbsp;pControl-&gt;GetParent()-&gt;SetSelected(-1);</DIV><DIV>&nbsp;DWORD dwSleep = 100;<BR>&nbsp;int nCnt = 4;</DIV><DIV>&nbsp;pControl-&gt;GetParent()-&gt;UpdateWindow();<BR>&nbsp;AfxGetApp()-&gt;PumpMessage();<BR>&nbsp;<BR>&nbsp;for (int ii = 0; ii &lt; nCnt; ii++)<BR>&nbsp;{<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;CClientDC dc(pControl-&gt;GetParent());<BR>&nbsp;&nbsp;&nbsp;dc.Draw3dRect(pControl-&gt;GetRect(), 0xFF, 0xFF);<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;Sleep(dwSleep);<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;pControl-&gt;RedrawParent(0);<BR>&nbsp;&nbsp;pControl-&gt;GetParent()-&gt;UpdateWindow();<BR>&nbsp;&nbsp;Sleep(dwSleep);<BR>&nbsp;}<BR>}<BR></DIV>]]>
   </description>
   <pubDate>Tue, 05 Feb 2008 01:46:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9408&amp;PID=30800&amp;title=highlighting-emphasizing-popup-entries#30800</guid>
  </item> 
  <item>
   <title><![CDATA[Highlighting/Emphasizing Popup Entries : I havesome &amp;#034;command finder&amp;#034;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=9408&amp;PID=30488&amp;title=highlighting-emphasizing-popup-entries#30488</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3003">mrmathis</a><br /><strong>Subject:</strong> 9408<br /><strong>Posted:</strong> 24 January 2008 at 12:22pm<br /><br />I have&nbsp;some "command finder" functionality that is used to highlight a command's location on the ribbon bar.&nbsp; It's a learning tool to help the novice user with menu navigation.&nbsp; To identify a given command, I "flash" it with a few timer-spaced calls to pControl-&gt;SetChecked(TRUE/FALSE).<DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>This works fine&nbsp;until I come to items on a popup menu.&nbsp; In that case, the call only highlights the icon portion of the menu, as shown on the left.&nbsp; I would like to highlight the entire menu entry, as shown on the right.</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/20080124_121033_Problem.png" border="0">&nbsp; <img src="https://forum.codejock.com/uploads/20080124_121111_Desired.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>I get the desired "look" when the user mouses over the menu, but I can't figure out how to get there programmatically.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Additionally, I would like to do this with commands that are currently inactive (disabled).&nbsp; I've tried enabling the command temporarily, but the command-active code kicks in and re-disables the command before the display happens.&nbsp; I'd rather not involve the command-active code with this (rather peripheral) functionality, but can't figure out a way to get around that.</DIV><DIV>&nbsp;</DIV><DIV>I've attached modifications to the ribbon sample to show how I got this far (<a href="https://forum.codejock.com/uploads/20080124_121530_ribb&#111;nsamplecod.zip" target="_blank"><FONT color=#780078>uploads/20080124_121530_ribbonsamplecod.zip</FONT></A>).&nbsp; I'd appreciate any suggestions on how to complete this task.</DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV><DIV>&nbsp;</DIV><DIV>--Mike</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 24 Jan 2008 12:22:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=9408&amp;PID=30488&amp;title=highlighting-emphasizing-popup-entries#30488</guid>
  </item> 
 </channel>
</rss>