📄 zcr14paintview.h
字号:
// ZCR14PaintView.h : interface of the CZCR14PaintView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_ZCR14PAINTVIEW_H__A859286B_4C04_4F78_B519_1C2028FA8DC7__INCLUDED_)
#define AFX_ZCR14PAINTVIEW_H__A859286B_4C04_4F78_B519_1C2028FA8DC7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ZCR14Shape.h"
#include "ZCR14Line.h"
#include "ZCR14Rect.h"
#include "ZCR14Ellipse.h"
class CZCR14PaintView : public CView
{
protected: // create from serialization only
CZCR14PaintView();
DECLARE_DYNCREATE(CZCR14PaintView)
// Attributes
public:
//CZCR14List* pList;
BOOL m_bPaintFlag;
int GetPenWith();
CZCR14PaintDoc* GetDocument();
CPoint m_ptStart,m_ptEnd;
//CObList m_lstShape;
CZCR14Shape* pShape;
CZCR14Line* pLine;
CZCR14Rect* pRect;
CZCR14Ellipse* pEllipse;
// Operations
public:
enum PAINTTYPE
{
IRREG_SEL=0,
RECT_SEL,
ERASER,
FILL,
SEL_COLOR,
MAGNIFY,
PEN,
BRUSH,
AIRBRUSH,
TEXT,
LINE,
CURVE,
RECT,
POLYGON,
ELLIPSE,
ROUND_RECT,
OUTLINED_RECT,
FILLED_RECT,
OUTLINED_ELLIPSE,
FILLED_ELLIPSE,
OUTLINED_POLYGON,
FILLED_POLYGON,
};
PAINTTYPE m_emPaintType;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CZCR14PaintView)
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 GetRectType();
void XorLine(CPoint pt1,CPoint pt2);
void Rectangle(CDC *pDC, CPoint ptUpperLeft, CPoint ptLowerLeft, BOOL bXorROP=FALSE);
COLORREF GetCanvasColor();
COLORREF GetPainColor();
CPoint m_pFirst;
CPoint m_pEnd;
virtual ~CZCR14PaintView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
BOOL m_bDrawing, m_bFirstDraw;
// Generated message map functions
protected:
void SetSelBox(int type);
//{{AFX_MSG(CZCR14PaintView)
afx_msg void OnUpdateButtonLine(CCmdUI* pCmdUI);
afx_msg void OnButtonLine();
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 OnUpdateButtonRect(CCmdUI* pCmdUI);
afx_msg void OnButtonRect();
afx_msg void OnUpdateButtonEllipse(CCmdUI* pCmdUI);
afx_msg void OnButtonEllipse();
afx_msg void OnButtonRoundRect();
afx_msg void OnUpdateButtonRoundRect(CCmdUI* pCmdUI);
afx_msg void OnButtonPolygon();
afx_msg void OnUpdateButtonPolygon(CCmdUI* pCmdUI);
afx_msg void OnButtonCurve();
afx_msg void OnUpdateButtonCurve(CCmdUI* pCmdUI);
afx_msg void OnButtonText();
afx_msg void OnUpdateButtonText(CCmdUI* pCmdUI);
afx_msg void OnButtonIrregSel();
afx_msg void OnUpdateButtonIrregSel(CCmdUI* pCmdUI);
afx_msg void OnButtonRectSel();
afx_msg void OnUpdateButtonRectSel(CCmdUI* pCmdUI);
afx_msg void OnButtonEraser();
afx_msg void OnUpdateButtonEraser(CCmdUI* pCmdUI);
afx_msg void OnButtonFill();
afx_msg void OnUpdateButtonFill(CCmdUI* pCmdUI);
afx_msg void OnButtonSelcolor();
afx_msg void OnUpdateButtonSelcolor(CCmdUI* pCmdUI);
afx_msg void OnButtonMagnify();
afx_msg void OnUpdateButtonMagnify(CCmdUI* pCmdUI);
afx_msg void OnButtonPen();
afx_msg void OnUpdateButtonPen(CCmdUI* pCmdUI);
afx_msg void OnButtonBrush();
afx_msg void OnUpdateButtonBrush(CCmdUI* pCmdUI);
afx_msg void OnButtonAirbrush();
afx_msg void OnUpdateButtonAirbrush(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in ZCR14PaintView.cpp
inline CZCR14PaintDoc* CZCR14PaintView::GetDocument()
{ return (CZCR14PaintDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ZCR14PAINTVIEW_H__A859286B_4C04_4F78_B519_1C2028FA8DC7__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -