singletonview.h

来自「设计模式之singleton模式例程」· C头文件 代码 · 共 67 行

H
67
字号
// SingletonView.h : interface of the CSingletonView class
//
/////////////////////////////////////////////////////////////////////////////

// This file is part of Singleton application to demonstrate the concept of Singleton classes.
// This file is generated by AppWizard and is provided "as is" with no expressed or 
// implied warranty.

#include "MsgHndlr.h"

class CSingletonView : public CView
{
protected: // create from serialization only
	CSingletonView();
	DECLARE_DYNCREATE(CSingletonView)

// Attributes
public:
	CSingletonDoc * GetDocument();
	CMsgHndlr	  * m_pMsgHndlr;

// Attributes
protected :
	CString			m_csMessage;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSingletonView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CSingletonView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CSingletonView)
	afx_msg void OnMsghndlrMessage1();
	afx_msg void OnMsghndlrMessage2();
	afx_msg void OnMsghndlrMessage3();
	afx_msg void OnMsghndlrCount();
	afx_msg void OnMsghndlrType();
	//}}AFX_MSG
	afx_msg LRESULT OnHandleMessage( WPARAM wParam, LPARAM lParam );
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in SingletonView.cpp
inline CSingletonDoc* CSingletonView::GetDocument()
   { return (CSingletonDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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