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

📄 test1view.h

📁 Viewdraw 30
💻 H
字号:
// test1View.h : interface of the CTest1View class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TEST1VIEW_H__EC008B22_2AC7_4E3F_939B_C1B2149FBBA7__INCLUDED_)
#define AFX_TEST1VIEW_H__EC008B22_2AC7_4E3F_939B_C1B2149FBBA7__INCLUDED_

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

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


	CTest1Doc* GetDocument();

// Operations
public:
    enum {OPER_SELECT,OPER_MOVE,OPER_DELETE,OPER_NULL}m_euOperator;
	enum{DRAW_SUISHOU,DRAW_LINE,DRAW_CIRCLE,DRAW_RECTANGLE,DRAW_TUOYUAN}m_euDrawType;
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTest1View)
	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:

    COLORREF m_crColor;
	int m_nPenWidth;
	int m_nPenType;

	CObject1 *pObject;
	CObList m_listRecord;
	
	CPoint m_ptEnd;
	CPoint m_ptFirst;
	CPoint m_ptTemp;

	bool m_bStart;
	int m_nSelect;
	bool m_bMoveSelect;
	bool m_bDraw;
private:
	CObject1 *m_pObject;
	
	virtual ~CTest1View();
#ifdef _DEBUG
	virtual  bool IsInArea(CPoint point);
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CTest1View)
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnDrawSuishou();
	afx_msg void OnDrawLine();
	afx_msg void OnDrawCircle();
	afx_msg void OnDrawRectangle();
	afx_msg void OnDrawTuoyuan();
	afx_msg void OnPenWidth1();
	afx_msg void OnPenWidth3();
	afx_msg void OnPenWidth5();
	afx_msg void OnPenWidth7();
	afx_msg void OnPenDot();
	afx_msg void OnPenDush();
	afx_msg void OnPenSolid();
	afx_msg void OnBrushSolid();
	afx_msg void OnDrawGetcolor();
	afx_msg void OnPen();
	afx_msg void OnDrawDelet();
	afx_msg void OnDrawMove();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in test1View.cpp
inline CTest1Doc* CTest1View::GetDocument()
   { return (CTest1Doc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_TEST1VIEW_H__EC008B22_2AC7_4E3F_939B_C1B2149FBBA7__INCLUDED_)

⌨️ 快捷键说明

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