📄 2dcadview.h
字号:
// 2DCADView.h : interface of the CMy2DCADView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_2DCADVIEW_H__EDC1A413_9D25_4366_9953_43B8947F1C3B__INCLUDED_)
#define AFX_2DCADVIEW_H__EDC1A413_9D25_4366_9953_43B8947F1C3B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define POINT 1
#define LINE 2
#define USER 3
class CMy2DCADView : public CView
{
protected: // create from serialization only
CMy2DCADView();
DECLARE_DYNCREATE(CMy2DCADView)
// Attributes
public:
CMy2DCADDoc* GetDocument();
// Operations
private:
int m_nStartX, m_nStartY;
int m_nEndX,m_nEndY;
int m_nStep;
int m_nLineWidth;
// 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_nLineStyle;
int m_iPenSlct;
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 OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSetLinewidth();
afx_msg void OnSetLinestyle();
//}}AFX_MSG
afx_msg void OnGraphLine();
afx_msg void OnUpdateGraphLine(CCmdUI* pCmdUI);
afx_msg LRESULT OnMyMessage (WPARAM wParam, LPARAM lParam);
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__EDC1A413_9D25_4366_9953_43B8947F1C3B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -