<?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 : MRU list</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : MRU list]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 17:51:42 +0000</pubDate>
  <lastBuildDate>Fri, 21 Nov 2008 12:28:57 +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=12729</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[MRU list : Thanks for the reply. Now I just...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=43100&amp;title=mru-list#43100</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4463">MadRiver</a><br /><strong>Subject:</strong> 12729<br /><strong>Posted:</strong> 21 November 2008 at 12:28pm<br /><br />Thanks for the reply.<br />Now I just have to translate it to C++....]]>
   </description>
   <pubDate>Fri, 21 Nov 2008 12:28:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=43100&amp;title=mru-list#43100</guid>
  </item> 
  <item>
   <title><![CDATA[MRU list : Hello,I suggest to do this way:Download...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=43040&amp;title=mru-list#43040</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 12729<br /><strong>Posted:</strong> 20 November 2008 at 12:20pm<br /><br />Hello,<br><br>I suggest to do this way:<br><br>Download the class cMRUFileList and include it in the Project:<br><br><a href="http://www.vbaccelerator.com/codelib/filemru/filemru.htm" target="_blank">http://www.vbaccelerator.com/codelib/filemru/filemru.htm</a><br><br>and adapt this code to your need (you can try it in a simple Form1 with a CommandBar and a Button):<br><br><br><table width="99%"><tr><td><pre class="BBcode"><br><br>Option Explicit<br><br>Const ID_FILE_EXIT = 1051<br><br>Const ID_FILE_MRU_1 = 40001<br>Const ID_FILE_MRU_2 = 40002<br>Const ID_FILE_MRU_3 = 40003<br>Const ID_FILE_MRU_4 = 40004<br><br>Public m_cMRU As New cMRUFileList<br><br>Private Sub Form_Load()<br>Dim Item As CommandBarAction<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; CommandBars1.EnableActions<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; With CommandBars1.Actions<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' MRU<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Item = .Add(ID_FILE_MRU_1, "&amp;1)", "1)", "", "File")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Item = .Add(ID_FILE_MRU_2, "&amp;2)", "2)", "", "File")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Item = .Add(ID_FILE_MRU_3, "&amp;3)", "3)", "", "File")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Item = .Add(ID_FILE_MRU_4, "&amp;4)", "4)", "", "File")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' EXIT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Add ID_FILE_EXIT, "Exit", "", "", "File"<br>&nbsp;&nbsp;&nbsp; End With<br><br>&nbsp;&nbsp;&nbsp; Dim ControlFile As CommandBarPopup<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Set ControlFile = CommandBars1.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "&amp;File", -1, False)<br>&nbsp;&nbsp;&nbsp; With ControlFile.CommandBar<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' MRU Group<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Controls.Add xtpControlButton, ID_FILE_MRU_1, ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Controls(.Controls.Count).BeginGroup = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Controls.Add xtpControlButton, ID_FILE_MRU_2, ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Controls.Add xtpControlButton, ID_FILE_MRU_3, ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Controls.Add xtpControlButton, ID_FILE_MRU_4, ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Controls.Add xtpControlButton, ID_FILE_EXIT, ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Controls(.Controls.Count).BeginGroup = True<br>&nbsp;&nbsp;&nbsp; End With<br><br>&nbsp;&nbsp;&nbsp; ' Most Recently Used<br>&nbsp;&nbsp;&nbsp; m_cMRU.MaxFileCount = 4<br>&nbsp;&nbsp;&nbsp; m_cMRU.Load "MyApp", "MySection"<br>&nbsp;&nbsp;&nbsp; Call pDisplayMRU<br><br><br>End Sub<br><br>Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)<br>Dim i As Integer<br>Dim strS As String<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Select Case Control.Id<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' ...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case ID_FILE_MRU_1 To ID_FILE_MRU_4<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call LoadDocument(m_cMRU.file(CLng(Control.Id - ID_FILE_MRU_1 + 1)))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case ID_FILE_EXIT:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Unload Me<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' ...<br>&nbsp;&nbsp;&nbsp; End Select<br><br>End Sub<br><br>Private Sub Command1_Click()<br>&nbsp;&nbsp;&nbsp; LoadDocument ("File1")<br>End Sub<br><br>Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; m_cMRU.Save "MyApp", "MySection"<br><br>End Sub<br><br>Public Sub pDisplayMRU()<br>Dim iFile As Integer<br>Dim Item As CommandBarControl<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; For iFile = 1 To m_cMRU.MaxFileCount<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Item = CommandBars1.FindControl(, ID_FILE_MRU_1 + (iFile - 1), , True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not (Item Is Nothing) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If (iFile &lt;= m_cMRU.FileCount) And (m_cMRU.FileExists(iFile)) Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.Visible = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.Caption = m_cMRU.MenuCaption(iFile)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.DescriptionText = m_cMRU.file(iFile)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If iFile = 1 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.Checked = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item.Visible = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; Next iFile<br>&nbsp;&nbsp;&nbsp; <br>End Sub<br><br><br>Private Sub LoadDocument(fname As String)<br><br>&nbsp;&nbsp;&nbsp; m_cMRU.AddFile fname<br>&nbsp;&nbsp;&nbsp; <br>'&nbsp;&nbsp;&nbsp; If FileExists Then<br>'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_cMRU.AddFile fname<br>'&nbsp;&nbsp;&nbsp; Else<br>'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_cMRU.RemoveFile fname<br>'&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; pDisplayMRU<br>&nbsp;&nbsp;&nbsp; <br>End Sub<br><br>Private Sub SaveDocument(fname As String)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; m_cMRU.AddFile fname<br>&nbsp;&nbsp;&nbsp; pDisplayMRU<br><br>End Sub<br><br><br><br></pre></td></tr></table><br><br>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 12:20:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=43040&amp;title=mru-list#43040</guid>
  </item> 
  <item>
   <title><![CDATA[MRU list : Hello, its for MFC only. ActiveX...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=43000&amp;title=mru-list#43000</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12729<br /><strong>Posted:</strong> 20 November 2008 at 1:59am<br /><br />Hello,<DIV>&nbsp;its for MFC only. ActiveX users have to implement it manually :(</DIV>]]>
   </description>
   <pubDate>Thu, 20 Nov 2008 01:59:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=43000&amp;title=mru-list#43000</guid>
  </item> 
  <item>
   <title><![CDATA[MRU list : Can someone point me towards some...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=42986&amp;title=mru-list#42986</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4463">MadRiver</a><br /><strong>Subject:</strong> 12729<br /><strong>Posted:</strong> 19 November 2008 at 4:42pm<br /><br />Can someone point me towards some information about implementing a Most Recently Used file list?  I found things like this in the samples:<br />Control = ControlFile.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID.ID_FILE_MRU_FILE1, "Recent File", false, false);<br />but as far as I could tell, those controls never get used.<br />Thanks for any pointers...]]>
   </description>
   <pubDate>Wed, 19 Nov 2008 16:42:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12729&amp;PID=42986&amp;title=mru-list#42986</guid>
  </item> 
 </channel>
</rss>