www.pudn.com > Shutdown.rar > ShutdownDlg.h
// ShutdownDlg.h : header file // #if !defined(AFX_SHUTDOWNDLG_H__DABF43F9_EEA9_4C49_8E57_B4E89394822E__INCLUDED_) #define AFX_SHUTDOWNDLG_H__DABF43F9_EEA9_4C49_8E57_B4E89394822E__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include#include "Y_Cls_ListCtrl_.h" ///////////////////////////////////////////////////////////////////////////// // CShutdownDlg dialog class Y_Cls_Progress { public: Y_Cls_Progress(){}; ~Y_Cls_Progress(){}; Y_Cls_Progress(Y_Cls_Progress& clsProgress) { if(this!=&clsProgress) (*this) = clsProgress; }; Y_Cls_Progress& operator = (Y_Cls_Progress &clsProgress) { strProgress = clsProgress.strProgress; nHour = clsProgress.nHour; nMinute = clsProgress.nMinute; nIfRun = clsProgress.nIfRun; }; CString strProgress; int nHour; int nMinute; int nIfRun; }; class CShutdownDlg : public CDialog { // Construction public: CShutdownDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CShutdownDlg) enum { IDD = IDD_SHUTDOWN_DIALOG }; CSpinButtonCtrl m_Spin2; CSpinButtonCtrl m_Spin1; CButton m_Check; Y_Cls_ListCtrl_ m_List_Progress; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CShutdownDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual BOOL PreCreateWindow(CREATESTRUCT& cs); //}}AFX_VIRTUAL // Implementation protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CShutdownDlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnClose(); afx_msg void OnDestroy(); afx_msg void OnMenuExit(); afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnAddProgress(); afx_msg void OnButApply(); afx_msg void OnCheckShutdown(); afx_msg void OnDelItem(); //}}AFX_MSG afx_msg void Do_MyMessage(WPARAM wraram,LPARAM lparam); afx_msg LRESULT ClickButton(WPARAM wraram,LPARAM lparam); afx_msg LRESULT CShutdownDlg::EditFinish(WPARAM wraram,LPARAM lparam); DECLARE_MESSAGE_MAP() private: int verify(); void InitAll(); NOTIFYICONDATA m_tnid; void InitFaceplate(); void ShutdownSoon(); void ShutdownWin2000NTXP(); void ShutdownWin98(); void ReadData(); void WriteData(); void InitListCtrl(Y_Cls_ListCtrl_ &m_List); CArray aryProgress; }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_SHUTDOWNDLG_H__DABF43F9_EEA9_4C49_8E57_B4E89394822E__INCLUDED_)