📄 2dcadview.h
字号:
// 2DCADView.h : interface of the CMy2DCADView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_2DCADVIEW_H__D75DD61E_2B32_42A2_AB0E_10BE0BD778A6__INCLUDED_)
#define AFX_2DCADVIEW_H__D75DD61E_2B32_42A2_AB0E_10BE0BD778A6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMy2DCADView : public CView
{
protected: // create from serialization only
CMy2DCADView();
DECLARE_DYNCREATE(CMy2DCADView)
// Attributes
public:
CMy2DCADDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy2DCADView)
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:
void SeedFill(int x,int y, COLORREF newcolor,COLORREF oldcolor);
public:
virtual ~CMy2DCADView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
afx_msg void OnContextMenu(CWnd*, CPoint point);
//{{AFX_MSG(CMy2DCADView)
afx_msg void OnGraphPoint();
afx_msg void OnUpdateGraphPoint(CCmdUI* pCmdUI);
afx_msg void OnUpdateGraphLine(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnUpdateGraphFill(CCmdUI* pCmdUI);
afx_msg void OnGraphPolygon();
afx_msg void OnUpdateGraphPolygon(CCmdUI* pCmdUI);
afx_msg void OnGraphCut();
afx_msg void OnUpdateGraphCut(CCmdUI* pCmdUI);
//}}AFX_MSG
afx_msg void OnGraphLine();
afx_msg void OnGraphFill();
afx_msg LRESULT OnMyMessage(WPARAM wParam,LPARAM lParam);
DECLARE_MESSAGE_MAP()
private:
bool m_bIsPoint;
bool m_bIsLine,m_bIsFill;
bool m_bIsPolygon;
private:
int m_nStartX,m_nStartY,m_nEndX,m_nEndY,m_nMidX,m_nMidY;
int m_nStep;
COLORREF m_nFillColor;
private:
bool m_bIsCut;
CPoint m_movePixel,m_pointDown;
CPoint LButtonDownPoint;
int m_nGraphType;
CDC m_dcCompatible;
};
#ifndef _DEBUG // debug version in 2DCADView.cpp
inline CMy2DCADDoc* CMy2DCADView::GetDocument()
{ return (CMy2DCADDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_2DCADVIEW_H__D75DD61E_2B32_42A2_AB0E_10BE0BD778A6__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -