📄 visdrawscrollview.h
字号:
#pragma once
#define MM_NONE 0 // from MFC viewscrl.cpp
// CVisDrawScrollView 视图
class CVisDrawScrollView : public CScrollView
{
protected:
CVisDrawScrollView(); // 动态创建所使用的受保护的构造函数
DECLARE_DYNCREATE(CVisDrawScrollView)
virtual ~CVisDrawScrollView();
//属性
protected:
CSize m_TotalSize;
BOOL m_bExtendX;
BOOL m_bExtendY;
long m_Delta;
CPoint m_Offset;
CPoint m_Center;
CSize m_Ratio;
protected:
CSize GetTotalSize() const; // [vlu]
//重载函数
void SetScrollSizes(int nMapMode, SIZE sizeTotal, const SIZE& sizePage = sizeDefault, const SIZE& sizeLine = sizeDefault);
void SetScaleToFitSize(SIZE sizeTotal); // sizeTotal [vlu]
void CenterOnPoint(CPoint Center); // Center [vlu]
CPoint GetScrollPosition() const; // [vlu]
void ScrollToPosition(POINT Point); // Point [vlu]
CPoint GetDeviceScrollPosition() const;
public:
void DocToClient(CRect& rect);
void DocToClient(CPoint& point);
void ClientToDoc(CPoint& point);
void ClientToDocDraw(CPoint& point);
void ClientToDoc(CRect& rect);
void ClientToDocDraw(CRect& rect);
protected:
CPoint GetDeviceOrg() const; // [du]
void GetLogClientRect(CRect *pRect) const; // [vlu]
CPoint GetLogPosition(CPoint Point) const; // [vlu]
void GetLogPosition(CRect &rect); // [vlu]
CPoint GetLogClientCenter() const; // [vlu]
void SaveClientCenter();
void RestoreClientCenter();
public:
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// virtual void OnDraw(CDC* pDC){CVisDrawScrollView::OnDraw(pDC);}; // 重写以绘制此视图
virtual void OnDraw(CDC* pDC); // 重写以绘制此视图
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -