📄 2dcadview.h
字号:
// 2DCADView.h : interface of the CMy2DCADView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_2DCADVIEW_H__A0BA788D_0E61_11D6_9C7C_5254AB31B8A3__INCLUDED_)
#define AFX_2DCADVIEW_H__A0BA788D_0E61_11D6_9C7C_5254AB31B8A3__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:
int m_nStartX, m_nStartY; //记录线段的起点坐标值
int m_nEndX, m_nEndY; //记录线段的终点坐标值
int m_nStep; //记录画线的操作步数
BOOL m_bIsLine; //标志画线状态
BOOL m_bIsPoint; //标志画点状态
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 OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg LRESULT OnMyMessage(WPARAM wParam, LPARAM lParam);
afx_msg void OnGraphLine();
DECLARE_MESSAGE_MAP()
};
#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__A0BA788D_0E61_11D6_9C7C_5254AB31B8A3__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -