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

📄 picturectrl.h

📁 SQLBig5BugTool 宽字符操作问题
💻 H
字号:

//PictureCtrl.h

#ifndef _PictureCtrl_
#define _PictureCtrl_

////////////////////////////////////////////////////////////////
// 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.
//
#include "picture.h"
//#include "StatLink.h"
#pragma once

//////////////////
// Class to encapsulate IPicture. This does not wrap all IPicture methods,
// only the ones I needed to implement ImgView -- feel free to add the others
// yourself.
//
class CPictureCtrl : public CStatic 
{
public:
	CPictureCtrl(BOOL bAutoLoadImage=TRUE);
	~CPictureCtrl();

	// brainless wrappers call CPicture
	BOOL LoadImage(UINT nIDRes) ;

	BOOL LoadImage(LPCTSTR pszPathName);

	BOOL LoadImage(CArchive& ar);

	BOOL LoadImage(IStream* pstm);

	CSize GetImageSize() ;

	const CPicture* GetPicture() ;

protected:
	CPicture m_pict;			// picture
	BOOL m_bAutoLoadImage;	// automatically load image w/same Ctrl ID
	
protected:
	virtual void PreSubclassWindow();

	// message handlers
	afx_msg void OnPaint();
	afx_msg int  OnCreate(LPCREATESTRUCT lpcs);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);

	DECLARE_DYNAMIC(CPictureCtrl)
	DECLARE_MESSAGE_MAP()
private:
	void OnLoadImageSuccess();
};

#endif

⌨️ 快捷键说明

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