32 lines
502 B
C++
32 lines
502 B
C++
#pragma once
|
|
#include <afxwin.h>
|
|
#include <gdiplus.h>
|
|
using namespace Gdiplus;
|
|
|
|
|
|
class CPictureCtrl :
|
|
public CStatic
|
|
{
|
|
|
|
public:
|
|
CPictureCtrl();
|
|
~CPictureCtrl();
|
|
|
|
BOOL LoadFromStream(IStream* piStream);
|
|
BOOL LoadFromReSource(DWORD dwID);
|
|
|
|
void FreeData();
|
|
|
|
|
|
public:
|
|
DECLARE_MESSAGE_MAP()
|
|
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
|
|
|
private:
|
|
ULONG_PTR m_gdiplusToken;
|
|
Bitmap* m_pBitmap;
|
|
public:
|
|
afx_msg void OnPaint();
|
|
};
|
|
|