www.pudn.com > rawbmp.rar > CImageView.h
// CImageView.h : interface of the CCImageView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CIMAGEVIEW_H__4507A64E_F4B9_48DF_BE9C_32F82DCF1D2D__INCLUDED_)
#define AFX_CIMAGEVIEW_H__4507A64E_F4B9_48DF_BE9C_32F82DCF1D2D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CCImageView : public CView
{
protected: // create from serialization only
CCImageView();
DECLARE_DYNCREATE(CCImageView)
// Attributes
public:
CCImageDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCImageView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
BITMAP Bitmap;
CString pathname;
BYTE Gray;
CCImageApp *app;
int HorOffSet;
int VerOffSet;
int m_nColorUse; // 实际用到的颜色数(也即颜色表数组的大小)
LONG m_nDataSize;
RGBQUAD* m_pColorTable; // 颜色表
LONG m_nWidth; // 位图宽度
LONG m_nHeight; // 位图高度
int m_flag; // 图像类型标记
BITMAPINFOHEADER m_bmih; // 位图信息头
BITMAPFILEHEADER m_bmfh; // 位图文件头
unsigned char * m_pImage; // 位图数据指针
virtual ~CCImageView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CCImageView)
afx_msg void OnFileOpen();
afx_msg void OnPaint();
afx_msg void OnFileSave();
afx_msg void OnFileSaveAs();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in CImageView.cpp
inline CCImageDoc* CCImageView::GetDocument()
{ return (CCImageDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CIMAGEVIEW_H__4507A64E_F4B9_48DF_BE9C_32F82DCF1D2D__INCLUDED_)