-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRecentFiles.h
More file actions
31 lines (31 loc) · 1018 Bytes
/
RecentFiles.h
File metadata and controls
31 lines (31 loc) · 1018 Bytes
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
#ifndef __RECENT_FILES_H
#define __RECENT_FILES_H
#include <Windows.h>
#include <vector>
#include <string>
struct RecentFileInfo {
std::basic_string<TCHAR> filename;
std::basic_string<TCHAR> fullpath;
FILETIME lastWriteTime;
bool isEmbedded;
std::vector<char> content;
};
class RecentFiles {
public:
static void PopulateDialogList(HWND hDlg, int comboId);
static void OnDialogFileSelected(HWND hDlg, int listboxId, int index);
static void Shutdown();
static bool FindByWindowTitle(HWND hwnd, TCHAR* title);
static std::basic_string<TCHAR> GetLastLoadedName();
static void SetLastLoadedName(const std::basic_string<TCHAR>& name);
private:
static HWND hListBox;
static std::vector<RecentFileInfo> files;
static std::vector<RecentFileInfo> embeddedFiles;
static bool initialized;
static std::basic_string<TCHAR> lastLoadedName;
static void LoadEmbeddedFiles();
static std::basic_string<TCHAR> GetExecutableDirectory();
static bool LoadEmbeddedConfig(HWND hwnd, const RecentFileInfo& file);
};
#endif