imageflatview.h
来自「VC++6开发指南的源代码第24章-第25章」· C头文件 代码 · 共 80 行
H
80 行
// ImageFlatView.h : interface of the CImageFlatView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_IMAGEFLATVIEW_H__0097DA73_8658_4C4D_A55E_6EEB68FCCC56__INCLUDED_)
#define AFX_IMAGEFLATVIEW_H__0097DA73_8658_4C4D_A55E_6EEB68FCCC56__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CChildFrame;
class CImageFlatView : public CScrollView
{
protected: // create from serialization only
CImageFlatView();
DECLARE_DYNCREATE(CImageFlatView)
void UpdateRulersInfo(int nMessage, CPoint ScrollPos, CPoint Pos = CPoint(0, 0));
// Attributes
public:
CImageFlatDoc* GetDocument();
CChildFrame* m_pParent;
CSize m_ImageSize;
int Mouse_yy;//获取鼠标移动的纵坐标
int Mouse_xx;//获取鼠标移动的横坐标
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CImageFlatView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
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);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CImageFlatView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CImageFlatView)
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnUpdateeIndicatorXX(CCmdUI* pCmdUI);
afx_msg void OnUpdateeIndicatorYY(CCmdUI* pCmdUI);
afx_msg void OnZoom();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in ImageFlatView.cpp
inline CImageFlatDoc* CImageFlatView::GetDocument()
{ return (CImageFlatDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_IMAGEFLATVIEW_H__0097DA73_8658_4C4D_A55E_6EEB68FCCC56__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?