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

📄 picture.h

📁 全屏显示的VC++源代码,简单实用。代码用VC++6.0编写。
💻 H
字号:
////////////////////////////////////////////////////////////////
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it.
// Compiles with Visual C++ 6.0 for Windows 98 and probably Windows 2000 too.
// Set tabsize = 3 in your editor.
//
#pragma once
//////////////////
// Picture object based on GDI+ Image class
//
class CPicture {
public:
	CPicture();
	~CPicture();

	// Load frm various sosurces
	BOOL Load(UINT nIDRes);
	BOOL Load(LPCTSTR pszPathName);
//	BOOL Load(CFile& file);
//	BOOL Load(CArchive& ar);
	BOOL Load(IStream* pstm);

	// render to device context
	BOOL Render(CDC* pDC, CRect rc=CRect(0,0,0,0)) const;

	CSize GetImageSize(CDC* pDC=NULL) const;


	operator BOOL() {
		return m_pImage!=NULL;
	}
	Image* GetImage() {
		return m_pImage;
	}

	void Rotate(RotateFlipType rft);
	void Free();

	BOOL m_bUseEmbeddedColorManagement;	     // set this before loading
	Image* m_pImage;						 // GDI+ Image object
	HGLOBAL m_hMem;							 // used for resource image
};

⌨️ 快捷键说明

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