📄 tinmap.h
字号:
// TinMap.h : interface of the CTinMap class
//
#pragma once
class CTinMap : public CView
{
protected: // 仅从序列化创建
CTinMap();
DECLARE_DYNCREATE(CTinMap)
// 属性
public:
CTinDoc* GetDocument() const;
protected:
// 内存DC
CDC *m_pMemDC;
CBitmap *m_pMemBM;
// 内存位图大小
long m_dw, m_dh;
// 客户区大小
long m_cw, m_ch;
long MoveX, MoveY;
// 工具条
long m_nTool1, m_nTool2;
long m_bLBDown;
CPoint m_prePoint, m_midPoint, m_endPoint;
// 操作
public:
void MoveTo(double x, double y);
// 重写
public:
virtual void OnDraw(CDC* pDC); // 重写以绘制该视图
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);
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
// 实现
public:
virtual ~CTinMap();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函数
protected:
afx_msg void OnSize(UINT nType, int cx, int cy);
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 BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnZoomInt();
afx_msg void OnUpdateZoomInt(CCmdUI* pCmdUI);
afx_msg void OnZoomOut();
afx_msg void OnUpdateZoomOut(CCmdUI* pCmdUI);
afx_msg void OnMovePan();
afx_msg void OnUpdateMovePan(CCmdUI* pCmdUI);
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // TinMap.cp 中的调试版本p
inline CTinDoc* CTinMap::GetDocument()
{ return (CTinDoc*)m_pDocument; }
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -