?? visdrawscrollview.h
字號:
#pragma once
#define MM_NONE 0 // from MFC viewscrl.cpp
// CVisDrawScrollView 視圖
class CVisDrawScrollView : public CScrollView
{
protected:
CVisDrawScrollView(); // 動態(tài)創(chuàng)建所使用的受保護的構(gòu)造函數(shù)
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]
//重載函數(shù)
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 + -