CRecentFileList::Add

将文件添加到最近使用的(MRU)文件列表。

virtual void Add(
   LPCTSTR lpszPathName 
);
virtual void Add(
   LPCTSTR lpszPathName,
   LPCTSTR lpszAppID
);
void Add(
   IShellItem* pItem,
   LPCTSTR lpszAppID
);
void Add(
   IShellLink* pLink,
   LPCTSTR lpszAppID
);
void Add(
   PIDLIST_ABSOLUTE pidl,
   LPCTSTR lpszAppID
);

参数

  • lpszPathName
    指定要添加的路径名到列表中。

  • lpszAppID
    为应用程序指定应用程序用户模型ID。

  • pItem
    指定指针shell将添加到列表。

  • pLink
    指定指针shell要添加的链接到列表中。

  • pidl
    应为其添加到新文档文件夹的shell项目指定IDLIST。

备注

文件名将添加到MRU列表的顶部。如果文件名已存在MRU列表,它将移动到上面。

要求

Header: afxadv.h

请参见

参考

CRecentFileList选件类

层次结构图

CRecentFileList::Remove

CRecentFileList::UpdateMenu