📄 imageview.h
字号:
// imageView.h : interface of the CImageView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_IMAGEVIEW_H__15DCEA53_406B_470F_B5CE_A725BC468B0D__INCLUDED_)
#define AFX_IMAGEVIEW_H__15DCEA53_406B_470F_B5CE_A725BC468B0D__INCLUDED_
#ifdef TEST_CASE_CODE
#include "Test_View.h"
#endif
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CShape;
class CText;
class CImageDoc;
class CImageView : public CScrollView
{
#ifdef TEST_CASE_CODE
friend class CTest_View;
#endif
protected: // create from serialization only
CImageView();
DECLARE_DYNCREATE(CImageView)
// Attributes
public:
CImageDoc* GetDocument();
CText* GetPreText()
{ return m_pPreText; }
void SetScale(float scale);
// Operations
public:
CEdit* m_pEdit;
private:
enum{LINE, CIRCLE, RECTANCLE, TEXT, DISENABLE} type;
CShape *m_pShapeCur;
CPoint m_ptCurrent;
CPoint m_ptPrev;
CDC *m_pDC;
CText *m_pPreText;
float m_fScale;
private:
void InvalidateDrawMenu(CCmdUI* pCmdUI);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CImageView)
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 ~CImageView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CImageView)
afx_msg void OnDrawCircle();
afx_msg void OnUpdateDrawCircle(CCmdUI* pCmdUI);
afx_msg void OnDrawLine();
afx_msg void OnUpdateDrawLine(CCmdUI* pCmdUI);
afx_msg void OnDrawRectancle();
afx_msg void OnUpdateDrawRectancle(CCmdUI* pCmdUI);
afx_msg void OnDrawText();
afx_msg void OnUpdateDrawText(CCmdUI* pCmdUI);
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 void OnZoomIn2();
afx_msg void OnZoomIn4();
afx_msg void OnZoomNormal();
afx_msg void OnZoomOut2();
afx_msg void OnZoomOut4();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in imageView.cpp
inline CImageDoc* CImageView::GetDocument()
{ return (CImageDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_IMAGEVIEW_H__15DCEA53_406B_470F_B5CE_A725BC468B0D__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -