bmpviewerdoc.h

来自「本代码实现对BMP格式文件的读取」· C头文件 代码 · 共 69 行

H
69
字号
// BMPViewerDoc.h : interface of the CBMPViewerDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_BMPVIEWERDOC_H__0094B659_A943_483B_A287_A8188E3351E5__INCLUDED_)
#define AFX_BMPVIEWERDOC_H__0094B659_A943_483B_A287_A8188E3351E5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CBMPViewerDoc : public CDocument
{
protected: // create from serialization only
	CBMPViewerDoc();
	DECLARE_DYNCREATE(CBMPViewerDoc)

// Attributes
public:
	BITMAPINFOHEADER bi;   //信息头
	RGBQUAD* quad;         //调色板
	BYTE* lpBuf;		   //图像数据
	BITMAPINFO* pbi;       
	int flag;              //标志表示是否打开了bmp文件
	int numQuad;	       //调色板数目
	BYTE* lpshowbuf;	   //用于显示的图像数据
	int zoomfactor;	       //缩放比率


// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBMPViewerDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	BOOL PrepareShowdata();//添加成员函数
	virtual ~CBMPViewerDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CBMPViewerDoc)
	afx_msg void OnFileOpen();//在classwizard里面选择
	afx_msg void OnZoomin();
	afx_msg void OnZoomout();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_BMPVIEWERDOC_H__0094B659_A943_483B_A287_A8188E3351E5__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?