📄 myworkview.h
字号:
// MyWorkView.h : interface of the CMyWorkView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYWORKVIEW_H__A15C2421_5E4A_4988_84FB_24D046C92091__INCLUDED_)
#define AFX_MYWORKVIEW_H__A15C2421_5E4A_4988_84FB_24D046C92091__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define POINTSNUM 100
#define POINT 1
#define LINE 2
#define RECTANGLE 3
#define ELLIPSE 4
#define TRIANGLE 10
#define CIRCLE 11
#define SQUARE 12
#define POLYGON 20
#define TEXT 30
class CMyWorkView : public CView
{
protected: // create from serialization only
int m_Drag;
CPoint *m_Ploygon;
CMyWorkView();
DECLARE_DYNCREATE(CMyWorkView)
// Attributes
public:
CMyWorkDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyWorkView)
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:
int m_numPloy;
CString str;
CPoint TextPoint;
CPoint mPointOld;
CPoint mPointOrign;
virtual ~CMyWorkView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMyWorkView)
afx_msg void OnDot();
afx_msg void OnLine();
afx_msg void OnRectangle();
afx_msg void OnEllipse();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSetting();
afx_msg void OnColor();
afx_msg void OnRect();
afx_msg void OnSmallrect();
afx_msg void OnSquare();
afx_msg void OnFileWrite();
afx_msg void OnFileRead();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnDrawPolygon();
afx_msg void OnText();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
COLORREF m_clr;
int m_nLineStyle;
UINT m_nLineWidth;
CPoint m_ptOrigin;
UINT m_nDrawType;
};
#ifndef _DEBUG // debug version in MyWorkView.cpp
inline CMyWorkDoc* CMyWorkView::GetDocument()
{ return (CMyWorkDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYWORKVIEW_H__A15C2421_5E4A_4988_84FB_24D046C92091__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -