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

📄 mygameview.h

📁 随手写的小游戏
💻 H
字号:
// MyGameView.h : interface of the CMyGameView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYGAMEVIEW_H__A648B7F3_4A98_4889_B7EA_072308F1B841__INCLUDED_)
#define AFX_MYGAMEVIEW_H__A648B7F3_4A98_4889_B7EA_072308F1B841__INCLUDED_

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


#include "MyStru.h"

class CMyGameView : public CFormView
{
protected: // create from serialization only
	CMyGameView();
	DECLARE_DYNCREATE(CMyGameView)

public:
	int		m_iGameType;


	int		m_iColumnCount;
	int		m_iRowCount;
	CFont	*m_pItemFont;
	CFont	*m_pClockFont;
	CBrush	m_UnclickBrush,m_ClickBrush;

    HCURSOR m_hCursorHand;          // Handle to the cursor to display

	int		m_iGameBonus;

	DWORD	m_dwGameStartTick;
	DWORD	m_dwLastTick;
//	DWORD	m_dw

	CLICK_ITEM	*m_pItemList;
	int			*m_pClickSeq;
	int			m_iCurClick;
	//{{AFX_DATA(CMyGameView)
	enum{ IDD = IDD_MYGAME_FORM };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Attributes
public:
	CMyGameDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyGameView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnDraw(CDC* pDC);
	//}}AFX_VIRTUAL

// Implementation
public:
	void DisplayBonus();
	int GetPointItem(CPoint point);
	BOOL BuildClickSequ(int iMode);
	BOOL ResizeAllItems(int cx,int cy);
	BOOL BuildAllItems(int iColumn,int iRow);
	virtual ~CMyGameView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMyGameView)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnGameNew();
	afx_msg void OnUpdateGameNew(CCmdUI* pCmdUI);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnGameSetup();
	afx_msg void OnUpdateGameSetup(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in MyGameView.cpp
inline CMyGameDoc* CMyGameView::GetDocument()
   { return (CMyGameDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_MYGAMEVIEW_H__A648B7F3_4A98_4889_B7EA_072308F1B841__INCLUDED_)

⌨️ 快捷键说明

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