⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vc10view.h

📁 Visual C++ 6.0编程基础与范例
💻 H
字号:
// VC10View.h : interface of the CVC10View class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_VC10VIEW_H__1356798C_55CC_11D3_9FEE_D8F8A5A79C32__INCLUDED_)
#define AFX_VC10VIEW_H__1356798C_55CC_11D3_9FEE_D8F8A5A79C32__INCLUDED_

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


class CVC10View : public CScrollView
{

protected: // create from serialization only
	CVC10View();
	DECLARE_DYNCREATE(CVC10View)

// Attributes
public:
	CVC10Doc* GetDocument();

// Operations
public:
	int m_x;					
	HBITMAP m_Bmp;					
	LPVOID m_ColorList;
	LPBYTE m_Image;			
	LPBITMAPINFOHEADER m_DibHead; 
	enum allocate {None, crtallocate, heapallocate};
	allocate m_nBmpallocate;
	allocate m_nImageallocate;
	DWORD m_ImageSize; 
	int m_nPalette;
	HANDLE m_hFile;
	HANDLE m_hMap;
	LPVOID m_lpvFile;
	HPALETTE m_hPalette;
	HGLOBAL m_hGlob; 

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CVC10View)
	public:
	virtual void OnDraw(CDC* pDC);  
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CVC10View();

public:
	CSize GetDibSize();
	BOOL MemToDib(LPVOID lMem);
	BOOL DibToDC(CDC* pDC, CSize size);  
	BOOL GetPalette();
	BOOL SetPalette();
	BOOL ReadFile(CFile* pFile);
	void Clear();
	void PaletteSize(int nBitCount);

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CVC10View)
	afx_msg void OnFileOpen();
	afx_msg void OnZoomOut();
	afx_msg void OnZoomIn();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in VC10View.cpp
inline CVC10Doc* CVC10View::GetDocument()
   { return (CVC10Doc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_VC10VIEW_H__1356798C_55CC_11D3_9FEE_D8F8A5A79C32__INCLUDED_)

⌨️ 快捷键说明

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