Adding Files to the Recent Documents List

If the fill H/PC-like shell is included, Windows CE displays a list of recently used documents. A user accesses the list through the taskbar Start menu or through another top-level application.

Windows CE does not track the last-opened documents. Instead, an application must signal Windows CE that it has opened a document. Windows CE then removes the least recently opened document from the menu and adds the new one.

The following code example shows how to add a document to the recently used list by calling the SHAddToRecentDocs function.

void SHAddToRecentDocs (UINT uFlags, LPCVOID pv);

The first parameter must be set to SHARD_PATH or SHARD_PIDL. On Windows CE, the second parameter points to the path of the document file. If the second parameter is 0, all items in the recently used document menu are deleted.