📄 mdrowpenview.h
字号:
// mDrowPenView.h : interface of the CMDrowPenView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MDROWPENVIEW_H__3E6E6FFE_9FA9_47D5_BF16_9DF3AF62F4F0__INCLUDED_)
#define AFX_MDROWPENVIEW_H__3E6E6FFE_9FA9_47D5_BF16_9DF3AF62F4F0__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "mDrowPenDoc.h"
//Line *mpLine;
class CMDrowPenView : public CView
{
protected: // create from serialization only
CMDrowPenView();
DECLARE_DYNCREATE(CMDrowPenView)
// Attributes
public:
CMDrowPenDoc * GetDocument();
CPoint m_pStartPoint;
CPoint m_pEndPoint;
CPoint m_oldPoint;
CPoint m_pzStarpoint;
CPoint m_pzEndpoint;
CPoint mOldPoint;
BOOL m_bFlag ;
int m_nFlag;
int m_nPenSize;
int nRed ;
int nBlue ;
int nGreen;
int nCount;
// Operations
public:
struct Line
{
CPoint Startpoint;
CPoint EndPoint;
int nPenSize;
int nmyRed;
int nmyGreen;
int nmyBlue;
struct Line *next;
};
Line *head;
Line *p;
Line *zhead;
Line *zp;
Line *chead;
Line *cp;
Line *rhead;
Line *rp;
Line *ehead;
Line *ep;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMDrowPenView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
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 GetPenValue(int value);
void DrawRect(CDC *pDC, CPoint *Startpoint, CPoint *Endpoint);
virtual ~CMDrowPenView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMDrowPenView)
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
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 OnDrawLine();
afx_msg void OnDrowThread();
afx_msg void OnDrowMline();
afx_msg void OnDrowArc();
afx_msg void OnDrowCecle();
afx_msg void OnDorwRect();
afx_msg void OnDrowEllipse();
afx_msg void OnSize();
afx_msg void OnColor();
afx_msg void OnUpdateXY(CCmdUI* pCmdUI); //此消息的映射是手工加上的,系统不会自动加载状态栏的消息映射。
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in mDrowPenView.cpp
inline CMDrowPenDoc* CMDrowPenView::GetDocument()
{ return (CMDrowPenDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MDROWPENVIEW_H__3E6E6FFE_9FA9_47D5_BF16_9DF3AF62F4F0__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -