-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWindowLayoutManagerDlg.h
More file actions
95 lines (75 loc) · 2.37 KB
/
Copy pathWindowLayoutManagerDlg.h
File metadata and controls
95 lines (75 loc) · 2.37 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
93
94
95
#pragma once
#include "afxcmn.h"
#include "SystemTray.h"
#include "ResizingDialog.h"
#include <list>
typedef std::list<MONITORINFOEX> MonitorList;
class CWindowLayoutManagerDlg : public CResizingDialog
{
typedef CResizingDialog super;
public:
CWindowLayoutManagerDlg(CWnd* pParent = nullptr); // standard constructor
public:
void addWindow(HWND hwnd);
private:
void createTray();
void minimizeToTray();
bool setForceForegroundWindow(HWND hwnd);
bool timerScan();
bool timerRestore();
void scan();
void lockScan(bool lock);
void restore();
void setAutoScan(bool enable);
void updateStatus();
void updateStatusFlush(bool show);
void timerStatus();
private:
struct MonitorInfo
{
MonitorList list;
};
bool saved;
MonitorInfo savedMonitorInfo;
int retryRestoring;
bool autoScan;
bool autoRestore;
bool toggleStatus;
bool locked;
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual BOOL PreTranslateMessage(MSG* pMsg);
private:
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_WINDOW_LAYOUT_MANAGER_DIALOG };
#endif
HICON iconApp;
CListCtrl listWindow;
SystemTray systemTray;
protected:
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
afx_msg void OnLvnGetdispinfoList(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnLvnDeleteitemList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnBnClickedOk();
afx_msg void OnBnClickedCancel();
afx_msg void OnBnClickedScan();
afx_msg void OnBnClickedWho();
afx_msg void OnBnClickedDelete();
afx_msg void OnBnClickedLock();
afx_msg void OnBnClickedRestore();
afx_msg void OnBnClickedAutoRestore();
afx_msg void OnBnClickedAutoScan();
afx_msg void OnLvnKeydownList(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg LRESULT OnTrayNotify(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnTaskRestarted(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnSingleProcess(WPARAM wParam, LPARAM lParam);
afx_msg void OnDestroy();
afx_msg void OnDisplayChange(UINT nImageDepth, int cxScreen, int cyScreen);
afx_msg void OnTimer(UINT_PTR nIDEvent);
};