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

📄 mineview.h

📁 能进行画图 鼠标移动画圆 矩形 同时改变光标
💻 H
字号:
// mineView.h : interface of the CMineView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MINEVIEW_H__CCB1C0E2_4138_4042_8177_A5EA9A573789__INCLUDED_)
#define AFX_MINEVIEW_H__CCB1C0E2_4138_4042_8177_A5EA9A573789__INCLUDED_

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


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

// Attributes
public:
	CMineDoc* GetDocument();

	void CreateRobot();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMineView)
	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 ~CMineView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMineView)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnObstCircle();
	afx_msg void OnObstRectangle();
	afx_msg void OnCreaterobot();
	afx_msg void OnArrow();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()


private:
	BOOL m_bDrawing;
	BOOL m_bErase;

	CPoint m_ptOld;	
	CPoint m_ptEnd;
	CPoint old_center;

	CRect  old_rect;
	CRect m_Obstrect;

public:

	CPoint m_ptStart;
	CPoint m_CircleCenter;
	int m_nDrawType;

	HCURSOR m_cursor;
	BOOL m_CreateRobot;


	int m_Radius;
	
};

#ifndef _DEBUG  // debug version in mineView.cpp
inline CMineDoc* CMineView::GetDocument()
   { return (CMineDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_MINEVIEW_H__CCB1C0E2_4138_4042_8177_A5EA9A573789__INCLUDED_)

⌨️ 快捷键说明

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