[e6231f]: PWSRecentFileList.h Maximize Restore History

Download this file

PWSRecentFileList.h    32 lines (27 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* Copyright (c) 2003-2007 Rony Shapiro <ronys@users.sourceforge.net>.
* All rights reserved. Use of the code is allowed under the
* Artistic License terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license.php
*/
/*
* This class works around a problem with CRecentFileList's implementation of Add,
* when the file being added doesn't exist (e.g., on a USB stick that has been
* removed). See the .cpp file for more details.
*
* Also, overrides ReadList & WriteList to work with our preference mechanism
* (that is, not neccesarily via the registry)
*/
#pragma once
class CPWSRecentFileList : public CRecentFileList
{
public:
CPWSRecentFileList(UINT nStart, LPCTSTR lpszSection,
LPCTSTR lpszEntryFormat, int nSize,
int nMaxDispLen = AFX_ABBREV_FILENAME_LEN)
: CRecentFileList(nStart, lpszSection, lpszEntryFormat,
nSize, nMaxDispLen){}
virtual void ReadList(); // reads from registry or config file
virtual void WriteList(); // writes to registry or config file
};