⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 singletonview.h

📁 设计模式之singleton模式例程
💻 H
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -