timepoweroffdlg.h

来自「使用VC++实现定时关机程序,本程序能够实现定时关机的功能。」· C头文件 代码 · 共 63 行

H
63
字号
// TimePowerOffDlg.h : header file
//

#if !defined(AFX_TIMEPOWEROFFDLG_H__A3D30C9F_6F76_446B_B92B_86DC10A42A9A__INCLUDED_)
#define AFX_TIMEPOWEROFFDLG_H__A3D30C9F_6F76_446B_B92B_86DC10A42A9A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CTimePowerOffDlg dialog

class CTimePowerOffDlg : public CDialog
{
// Construction
public:
	CTimePowerOffDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTimePowerOffDlg)
	enum { IDD = IDD_TIMEPOWEROFF_DIALOG };
	CStatic	m_cInfo;
	CString	m_sInfo;
	CTime	m_Time1;
	CTime	m_Time2;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTimePowerOffDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
protected:
	bool bAppend;
	void PowerOff();
	HICON m_hIcon,hIcon;
	CTime StrToTime(CString str);
	CTime GetOffTime(); 
    CTime timeOff;
	NOTIFYICONDATA m_tnid; 
	// Generated message map functions
	//{{AFX_MSG(CTimePowerOffDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnOK();
	afx_msg void OnOk2();
	afx_msg void OnTimer(UINT nIDEvent);
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TIMEPOWEROFFDLG_H__A3D30C9F_6F76_446B_B92B_86DC10A42A9A__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?