📄 picture.h
字号:
// Picture.h: interface for the CPicture class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PICTURE_H__6098A4C3_D6D5_4711_BC7B_1595F459B480__INCLUDED_)
#define AFX_PICTURE_H__6098A4C3_D6D5_4711_BC7B_1595F459B480__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CPicture
{
public:
CPicture();
virtual ~CPicture();
bool Load(CString sResourceType, CString sResource);
bool Load(CString sFileName);
bool Draw(CDC* pDC);
bool Draw(CDC* pDC, CPoint Pos);
bool Draw(CDC* pDC, CPoint Pos, CSize Size);
bool Draw(CDC* pDC, double nSizeRatio);
bool Draw(CDC* pDC, CPoint Pos, double nSizeRatio);
CSize GetSize(CDC* pDC);
private:
static bool GetResource(LPSTR lpName, LPSTR lpType, void* pResource, int& nBufSize);
void UnLoad();
bool LoadFromBuffer(BYTE* pBuff, int nSize);
bool Draw(CDC* pDC, int x, int y, int cx, int cy);
public:
IPicture* m_pPicture;
enum
{
HIMETRIC_INCH = 2540
};
};
#endif // !defined(AFX_PICTURE_H__6098A4C3_D6D5_4711_BC7B_1595F459B480__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -