Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Multiple MRU Lists
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multiple MRU Lists

 Post Reply Post Reply
Author
Message
dawiebe View Drop Down
Newbie
Newbie
Avatar

Joined: 03 June 2009
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote dawiebe Quote  Post ReplyReply Direct Link To This Post Topic: Multiple MRU Lists
    Posted: 04 June 2009 at 10:15am
Hello,

I have been using other tutorials in VC++6.0 to use multiple MRU lists, (http://www.codeguru.com/cpp/w-d/doc_view/mrumostrecentusedfilelist/article.php/c3297), however when it goes to update the MRU Menu,

Code:

void CRecentFileList::UpdateMenu(CCmdUI* pCmdUI)
{
    ASSERT(m_arrNames != NULL);

    CMenu* pMenu = pCmdUI->m_pMenu;
    if (m_strOriginal.IsEmpty() && pMenu != NULL)
        pMenu->GetMenuString(pCmdUI->m_nID, m_strOriginal, MF_BYCOMMAND);

    if (m_arrNames[0].IsEmpty())
// There are items in the array list,
    {                            //
so it skips over this if-statement
        // no MRU files
        if (!m_strOriginal.IsEmpty())
            pCmdUI->SetText(m_strOriginal);
        pCmdUI->Enable(FALSE);
        return;
    }

    if (pCmdUI->m_pMenu == NULL)
// But m_pMenu always ends up being null,
       
return;                  // and it doesn't actually add the MRU files
                                 // to the menu bar list.


    for (int iMRU = 0; iMRU < m_nSize; iMRU++)
        pCmdUI->m_pMenu->DeleteMenu(pCmdUI->m_nID + iMRU, MF_BYCOMMAND);

  ............
}


In the MRU list on the menu bar, there ends up being one item which I can highlight and click on, but it has no name.


I have searched the forums, and I have found a similar request here:
https://forum.codejock.com/forum_posts.asp?TID=2848&KW=&PID=49606#49606
however the files that were provided are no longer accessable.

Thanks

Dave
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 June 2009 at 1:57am
Hi,
 
Here one sample
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dawiebe View Drop Down
Newbie
Newbie
Avatar

Joined: 03 June 2009
Location: Canada
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote dawiebe Quote  Post ReplyReply Direct Link To This Post Posted: 09 June 2009 at 4:35pm
Wow, that was perfect.

Thank you so much for your help!

Dave
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.