-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBitmap.h
More file actions
50 lines (37 loc) · 1.41 KB
/
Bitmap.h
File metadata and controls
50 lines (37 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//************************************************************************
// The Logitech LCD SDK, including all acompanying documentation,
// is protected by intellectual property laws. All use of the Logitech
// LCD SDK is subject to the License Agreement found in the
// "Logitech LCD SDK License Agreement" file and in the Reference Manual.
// All rights not expressly granted by Logitech are reserved.
//************************************************************************
//************************************************************************
//
// Bitmap.h
//
//************************************************************************
#ifndef _BITMAP_H_INCLUDED_
#define _BITMAP_H_INCLUDED_
#include <GdiPlus.h>
class cBitmap
{
public:
cBitmap(void);
virtual ~cBitmap(void);
void Shutdown(void);
void Detach(void);
HRESULT LoadFromResource(HDC hDC, HINSTANCE hInstance, UINT nResourceID, LPCTSTR sResourceType);
HRESULT LoadFromFile(HDC hDC, LPCTSTR sFilename);
HRESULT LoadFromMemory(HDC hDC, LPVOID pBuffer, size_t nBufferSize);
int GetWidth(void);
int GetHeight(void);
HBITMAP GetHBITMAP(void);
BOOL IsValid() { return NULL != m_pGdiPlusBitmap; }
private:
Gdiplus::Bitmap* m_pGdiPlusBitmap;
HBITMAP m_hBM;
int m_nWidth;
int m_nHeight;
};
#endif // !_BITMAP_H_INCLUDED_
//** end of Bitmap.h *****************************************************