📄 bodyprotectdlg.h
字号:
// BodyProtectDlg.h : header file
//
#if !defined(AFX_BODYPROTECTDLG_H__408FA2BC_47AD_42E5_B153_E02E5B50D6F5__INCLUDED_)
#define AFX_BODYPROTECTDLG_H__408FA2BC_47AD_42E5_B153_E02E5B50D6F5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "systemtray.h"
/////////////////////////////////////////////////////////////////////////////
// CBodyProtectDlg dialog
class CConfigData{
public:
CConfigData();
virtual ~CConfigData(){};
public:
bool WriteConfigFile(CString strFile);
bool ReadConfigFile(CString strFile);
CString m_strLabel;
CString m_strExeCode;//可执行文件特征码
CString m_strPass;// 加密的密码
CArray<CString,CString&> m_arrFiles;
};
class CBodyProtectDlg : public CDialog
{
// Construction
public:
void GetProcessList();
CBodyProtectDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CBodyProtectDlg)
enum { IDD = IDD_BODYPROTECT_DIALOG };
CListBox m_listProcess;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBodyProtectDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
CSystemTray m_TrayIcon;
CString m_strAppPath;
public:
void Restore();
void Protect();
void SetItemState(bool);
bool IsDataProtected();
void DecryptFiles();
void wipePwds(CString& strPwd, CString& strVerify);
bool EncryptDecryptFile(CString strFileSrc,CString strFileDest,bool bDecrypt);
void EncryFiles();
void CloseProcesses();
static CConfigData c_configData;
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CBodyProtectDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnViewMainWindow();
afx_msg void OnUpdateViewMainWindow(CCmdUI* pCmdUI);
afx_msg LRESULT OnTrayNotification(WPARAM wParam, LPARAM lParam);
afx_msg void OnBtnProtect();
afx_msg void OnBtnCloseapp();
afx_msg void OnBtnQuitapp();
afx_msg void OnBtnConfig();
afx_msg void OnBtnRestore();
virtual void OnOK();
afx_msg void OnBtnSetpass();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_BODYPROTECTDLG_H__408FA2BC_47AD_42E5_B153_E02E5B50D6F5__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -