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

📄 picture.h

📁 对列表中的图片的浏览,可以进行上下翻页,可以装载jpg的图片
💻 H
字号:
/********************************************************************

********************************************************************/

#ifndef PICTURE_H
#ifndef picture_h

#define PICTURE_H
#define picture_h


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


class CPicture
{
public:
 CPicture();
 virtual ~CPicture();

public:
 BOOL LoadPicture(UINT nResource, LPCTSTR lpszResType)
 {return LoadPicture(MAKEINTRESOURCE(nResource), lpszResType);}
 BOOL LoadPictureFromFile(LPCTSTR lpszFileName);
 BOOL LoadPicture(LPCTSTR lpszResource,LPCTSTR lpszResType);
 BOOL IsValid(){ return m_pPic!=NULL;}
 CSize GetSize(){return m_size;}
 void Draw(CDC* pDC, LPCRECT lprcDest, LPCRECT lprcSrc); 
 void Draw(CDC* pDC, int xDest,int yDest, int cxDest, int cyDest ,
  int xSrc ,int ySrc ,int cxSrc ,int cySrc); 

 void Release();

protected:
 IPicture*   m_pPic;

 OLE_XSIZE_HIMETRIC   _w_him;
 OLE_YSIZE_HIMETRIC   _h_him;

 CSize     m_size;

protected:
 void CalcSize();
};


#endif // define picture_h
#endif // define PICTURE_H

⌨️ 快捷键说明

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