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

📄 moveview.h

📁 MFC应用程序,利用上下左右方向键,控制窗体中正方形的移动
💻 H
字号:
// MoveView.h : interface of the CMoveView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MOVEVIEW_H__7EF3EA1F_49DB_4450_804F_5381DA49D391__INCLUDED_)
#define AFX_MOVEVIEW_H__7EF3EA1F_49DB_4450_804F_5381DA49D391__INCLUDED_

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


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

// Attributes
public:
	CMoveDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMoveView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

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

protected:

// Generated message map functions
protected:
	int m_x1;
	int m_y1;
	int m_x2;
	int m_y2;

	//{{AFX_MSG(CMoveView)
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in MoveView.cpp
inline CMoveDoc* CMoveView::GetDocument()
   { return (CMoveDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_MOVEVIEW_H__7EF3EA1F_49DB_4450_804F_5381DA49D391__INCLUDED_)

⌨️ 快捷键说明

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