📄 vcadview.h
字号:
// VCadView.h : interface of the CVCadView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VCADVIEW_H__0F72222D_9328_11D4_95E5_00001C538465__INCLUDED_)
#define AFX_VCADVIEW_H__0F72222D_9328_11D4_95E5_00001C538465__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class Position;
class CVCadView : public CView
{
protected: // create from serialization only
CVCadView();
DECLARE_DYNCREATE(CVCadView)
// Attributes
public:
CVCadDoc* GetDocument();
// Operations
protected:
// 世界坐标与屏幕坐标的关系
double m_dOrgX;
double m_dOrgY; // 世界坐标的原点坐标
double scale; // 屏幕坐标到世界坐标的比例因子
class CCommand* m_pCmd;
public:
// 世界坐标转换为屏幕坐标,
// 输入:世界坐标pos, 输出:屏幕坐标screenPt
void WorldtoScreen(const Position& pos, CPoint& screenPt);
// 屏幕坐标转换为世界坐标,
// 输入:屏幕坐标screenPt, 输出:世界坐标pos
void ScreentoWorld(const CPoint& screenPt, Position& pos);
// 得到屏幕坐标到世界坐标的比例因子
double GetScale();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CVCadView)
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:
virtual ~CVCadView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CVCadView)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg void OnCreateEntity(int m_nID);
afx_msg void OnUpdateCreateCommand(CCmdUI* pCmdUI);
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in VCadView.cpp
inline CVCadDoc* CVCadView::GetDocument()
{ return (CVCadDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VCADVIEW_H__0F72222D_9328_11D4_95E5_00001C538465__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -