www.pudn.com > SaveScreen.rar > ScreenSaver.h, change:2000-09-16,size:2740b


 
#ifndef _SCREENSAVER_H__ 
#define _SCREENSAVER_H__ 
 
typedef DWORD (WINAPI *LPVERIFYSCREENSAVEPWD)(HWND hWnd); 
 
class CScreenSaverCommandLineInfo : public CCommandLineInfo 
{ 
public: 
	CScreenSaverCommandLineInfo(); 
	~CScreenSaverCommandLineInfo(); 
 
	virtual void ParseParam(LPCTSTR pszParam, BOOL bFlag, BOOL bLast); 
 
	enum 
	{ 
		ScreenSaverMode, 
		PreviewMode, 
		ShowChangePasswordDialog, 
		ShowConfigureDialog, 
	}m_nShellCommand; 
	HWND m_hParentWnd; 
}; 
 
class CScreenSaverWnd : public CWnd 
{ 
public: 
	CScreenSaverWnd(); 
	virtual ~CScreenSaverWnd(); 
   
	virtual BOOL Create(BOOL bChild, CWnd* pParentWnd); 
	void SetPreviewFlag(BOOL bPreview) { m_bPreview = bPreview; }; 
   
protected: 
	virtual CRect GetBoundingRect(BOOL bChild, CWnd* pParentWnd); 
	virtual DWORD GetWindowStyle(BOOL bChild, CWnd* pParentWnd); 
	virtual DWORD GetExtendedWindowStyle(BOOL bChild, CWnd* pParentWnd); 
 
	//{{AFX_VIRTUAL(CScreenSaverWnd)     
	virtual void PostNcDestroy(); 
	//}}AFX_VIRTUAL 
 
	//{{AFX_MSG(CScreenSaverWnd) 
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); 
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); 
	afx_msg void OnActivateApp(BOOL bActive, HTASK hTask); 
	afx_msg void OnMouseMove(UINT nFlags, CPoint point); 
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnMButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnPaint(); 
	afx_msg void OnClose(); 
	//}}AFX_MSG 
 
	DECLARE_DYNCREATE(CScreenSaverWnd) 
	DECLARE_MESSAGE_MAP() 
 
	BOOL                  m_bGotCursorPos; 
	CPoint                m_LastPos; 
	BOOL                  m_bPreview; 
	BOOL                  m_bPasswordProtected; 
	BOOL                  m_bDialogUp; 
	HINSTANCE             m_hPasswordCpl; 
	LPVERIFYSCREENSAVEPWD m_lpfnVerifyScreenSavePwd; 
}; 
 
class CScreenSaverApp : public CWinApp 
{ 
public: 
	CScreenSaverApp(); 
	~CScreenSaverApp(); 
 
protected: 
	void SetScreenSaverTemplate(CRuntimeClass* pRuntimeScreenSaverWnd); 
	virtual void ParseCommandLine(CScreenSaverCommandLineInfo& rCmdInfo); 
	virtual BOOL ProcessShellCommand(CScreenSaverCommandLineInfo& rCmdInfo); 
	virtual void ShowConfigureDialog(CWnd* pParentWnd); 
	virtual void ChangePassword(CWnd* pParentWnd); 
 
	//{{AFX_VIRTUAL(CScreenSaverApp) 
	virtual BOOL InitInstance(); 
	//}}AFX_VIRTUAL 
 
	//{{AFX_MSG(CScreenSaverApp) 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
 
	CRuntimeClass* m_pRuntimeScreenSaverWnd; 
}; 
 
#endif //_SCREENSAVER_H__