-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFileSearchDlg.h
More file actions
92 lines (74 loc) · 2.59 KB
/
Copy pathFileSearchDlg.h
File metadata and controls
92 lines (74 loc) · 2.59 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Copyleft 2004 Chris Korda
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or any later version.
/*
chris korda
revision history:
rev date comments
00 09jan04 initial version
abstract class to search for files recursively
*/
#if !defined(AFX_FILESEARCHDLG_H__7AC939AA_8FC7_46F8_AFA6_AE0C528A46FC__INCLUDED_)
#define AFX_FILESEARCHDLG_H__7AC939AA_8FC7_46F8_AFA6_AE0C528A46FC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxmt.h>
// FileSearchDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CFileSearchDlg dialog
class CFileSearchDlg : public CDialog
{
public:
// Construction
CFileSearchDlg(LPCSTR Folder, CWnd* pParent = NULL);
virtual ~CFileSearchDlg();
// Constants
enum DRIVE_TYPE_MASK {
DTM_UNKNOWN = (1 << DRIVE_UNKNOWN), // The drive type cannot be determined.
DTM_NO_ROOT_DIR = (1 << DRIVE_NO_ROOT_DIR), // The root directory does not exist.
DTM_REMOVABLE = (1 << DRIVE_REMOVABLE), // The disk can be removed from the drive.
DTM_FIXED = (1 << DRIVE_FIXED), // The disk cannot be removed from the drive.
DTM_REMOTE = (1 << DRIVE_REMOTE), // The drive is a remote (network) drive.
DTM_CDROM = (1 << DRIVE_CDROM), // The drive is a CD-ROM drive.
DTM_RAMDISK = (1 << DRIVE_RAMDISK), // The drive is a RAM disk.
DTM_ALL = -1
};
// Attributes
void SetDriveTypeMask(int Mask);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFileSearchDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Dialog data
//{{AFX_DATA(CFileSearchDlg)
enum { IDD = IDD_FILE_SEARCH_DLG };
//}}AFX_DATA
// Generated message map functions
//{{AFX_MSG(CFileSearchDlg)
virtual BOOL OnInitDialog();
virtual void OnCancel();
//}}AFX_MSG
afx_msg LRESULT OnUser(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
// Member data
CString m_Folder;
volatile bool m_Cancel;
int m_DriveTypeMask;
// Helpers
bool SearchFolder(LPCSTR Folder);
bool SearchAllDrives();
void Search();
static UINT SearchThread(LPVOID pParam);
virtual bool OnFile(LPCSTR Path) = 0;
NOCOPIES(CFileSearchDlg);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FILESEARCHDLG_H__7AC939AA_8FC7_46F8_AFA6_AE0C528A46FC__INCLUDED_)