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

📄 picviewdoc.h

📁 Pocket PC上的图片浏览程序。开发工具:eVC。
💻 H
字号:
//---------------------------------------------------------------------------
//
//	PicViewDoc.h : interface of the CPicViewDoc class
//
//---------------------------------------------------------------------------


#if !defined(AFX_PICVIEWDOC_H__B0317E15_FD82_4FE5_9059_20021EC10A29__INCLUDED_)
#define AFX_PICVIEWDOC_H__B0317E15_FD82_4FE5_9059_20021EC10A29__INCLUDED_

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


#include <imgdecmp.h>


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

	enum ZoomLimits
	{
		zoomDelta	= 10,
		zoomMin		= 10,
		zoomDef		= 100,
		zoomMax		= 800
	};

// Attributes
public:

// Operations
public:
	HBITMAP GetBitmap		() {return m_hBmp;}
	int		GetWidth		() {return m_nWidth;}
	int		GetHeight		() {return m_nHeight;}
	int		GetZoom			() {return m_nZoom;}
	int		GetZoomWidth	() {return m_nWidth * m_nZoom / 100;}
	int		GetZoomHeight	() {return m_nHeight * m_nZoom / 100;}
	
	int		ScaleScreen		(int x) {return x * 100 / m_nZoom;}
	int		ScaleBitmap		(int x)	{return x * m_nZoom / 100;}


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

// Implementation
public:
	virtual ~CPicViewDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	HBITMAP m_hBmp;
	int		m_nWidth,
			m_nHeight,
			m_nZoom;

	static DWORD CALLBACK GetImageData(LPSTR pBuf, DWORD dwBufMax, LPARAM lParam);
	static void	 CALLBACK ImageProgress(IImageRender *pRender, BOOL bComplete, LPARAM lParam);


protected:
	// Generated message map functions
	//{{AFX_MSG(CPicViewDoc)
	afx_msg void OnUpdateZoomMinus(CCmdUI* pCmdUI);
	afx_msg void OnZoomMinus();
	afx_msg void OnUpdateZoomPlus(CCmdUI* pCmdUI);
	afx_msg void OnZoomPlus();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_PICVIEWDOC_H__B0317E15_FD82_4FE5_9059_20021EC10A29__INCLUDED_)

⌨️ 快捷键说明

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