-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainFrm.h
136 lines (123 loc) · 4.58 KB
/
MainFrm.h
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__F484B4BC_1D82_11D6_8D1C_94DA39A0DB44__INCLUDED_)
#define AFX_MAINFRM_H__F484B4BC_1D82_11D6_8D1C_94DA39A0DB44__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ChildView.h"
#include "SystemTray.h"
#include "PPageCommon.h"
#include "PPagePerfomance.h"
#include "PPageAppMenu.h"
#include "PPageHide.h"
#include "PPageHotKeys.h"
#include "PPagePasswords.h"
#include "PPageWndMain.h"
#include "PasswordDialog.h"
#include "EnumWinModules.h"
#include "WndParmList.h"
#include "WNDPPageHide.h"
#include "WNDPPagePasswords.h"
#include "WNDPPagePerfomance.h"
#include "InfoStore.h"
#define WM_NOTIFYICONMSG (WM_APP + 1)
class CMainFrame : public CFrameWnd
{
public:
CMainFrame();
protected:
DECLARE_DYNAMIC(CMainFrame)
HICON m_hTrayIconEmpty;
HICON m_hTrayIconFull;
CMenu m_wndMenu;
CSystemTray m_SystemTray;
// Attributes
public:
// Operations
public:
void HideAllWindows(void);
BOOL m_isMenuDialogActive;
BOOL WriteSettings(void);
BOOL ReadSettings(void);
BOOL m_hasDestroying;
void HandleAppMenu(HWND hWnd, POINT point, int typeHidden);
void HandleWndMenu(HWND hWnd, POINT point);
BOOL HideWindow(HWND hWnd, DWORD event);
void HandlePopupMenu(HWND hWnd, POINT point);
int CHideDlg(CWnd* pParent = NULL); // standard constructor
int m_lastPropSheetActivePage;
HWND m_wndMenuHWND;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
public:
enum {
eventSYSMENU = 0x0001,
eventMINIMIZE = 0x0002,
eventNCRBUTTONDOWN = 0x0003,
eventNCRBUTTONDBLCLK = 0x0004,
eventHIDEACTIVE = 0x0005,
eventWNDMENU = 0x0006,
eventHIDEALL = 0x0007,
};
void ProcessWindowSetting(HWND hWnd);
void ShowWindowSettings(int listIndex);
void ShowLastHiddenApplication();
void SetLocalVariables(CPPageCommon* pageCommon, CPPageAppMenu* pageAppMenu, CPPageHide* pageHide, CPPagePerfomance* pagePerfomance, CPPageHotKeys* pageHotKeys, CPPagePasswords* pagePasswords);
void SetGlobalVariables(CPPageCommon* pageCommon, CPPageAppMenu* pageAppMenu, CPPageHide* pageHide, CPPagePerfomance* pagePerfomance, CPPageHotKeys* pageHotKeys, CPPagePasswords* pagePasswords);
void SetWNDLocalVariables(int listIndex, CPPageWndMain* pageWndMain, CWNDPPageHide* pageHide, CWNDPPagePerfomance* pagePerfomance, CWNDPPagePasswords* pagePasswords);
void SetWNDGlobalVariables(int listIndex, CPPageWndMain* pageWndMain, CWNDPPageHide* pageHide, CWNDPPagePerfomance* pagePerfomance, CWNDPPagePasswords* pagePasswords);
long GetPasswordHash(CString passwordStr);
void ShowWindowSettings();
BOOL CheckPassword(long pHash);
BOOL ShowWindowByHWND(HWND hWnd, int mode);
BOOL ShowWindowByWndId(DWORD appId);
int GetWndSettings(HWND hWnd);
int GetWndSettings(DWORD procId);
void GetWndIcon(HWND hWnd, HICON& bigWndIcon, HICON& smallWndIcon, BOOL extractExe);
void HandleContextMenu(HWND hWnd, POINT point);
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
CChildView m_wndView;
// Generated message map functions
protected:
CString m_moduleName;
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSetFocus(CWnd *pOldWnd);
afx_msg void OnAboutbox();
afx_msg void OnHideall();
afx_msg void OnExit();
afx_msg void OnSettings();
afx_msg void OnShowall();
afx_msg BOOL OnQueryEndSession();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnWndsettings();
afx_msg void OnHideWnd();
afx_msg void OnCustomwndsettings();
afx_msg void OnWndsettingspopup();
afx_msg void OnSettingspopup();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
BOOL m_isHideAllAppActive;
void CheckForWM_NOTIFYICONMSG(UINT message, WPARAM wParam, LPARAM lParam);
BOOL m_isHidingActive;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__F484B4BC_1D82_11D6_8D1C_94DA39A0DB44__INCLUDED_)