forked from sabrogden/Ditto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGdiImageDrawer.h
30 lines (22 loc) · 1005 Bytes
/
GdiImageDrawer.h
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
#pragma once
#include "CGdiPlusBitmap.h"
#include "DPI.h"
class CGdiImageDrawer
{
public:
CGdiImageDrawer();
~CGdiImageDrawer();
BOOL LoadStdImage(UINT id, LPCTSTR pType);
BOOL LoadStdImageDPI(int dpi, UINT id96, UINT id120, UINT id144, UINT id168, UINT id192, LPCTSTR pType, UINT id225 = 0, UINT id250 = 0, UINT id275 = 0, UINT id300 = 0, UINT id325 = 0, UINT id350 = 0);
void Draw(CDC* pScreenDC, CDPI &dpi, CWnd *pWnd, int posX, int posY, bool mouseHover, bool mouseDown, int forceWidth = INT_MAX, int forceHeight = INT_MAX);
void Draw(CDC* pScreenDC, CDPI &dpi, CWnd *pWnd, CRect rc, bool mouseHover, bool mouseDown);
BOOL LoadRaw(unsigned char* bitmapData, int imageSize);
UINT ImageWidth() { return m_pStdImage->m_pBitmap->GetWidth(); }
UINT ImageHeight() { return m_pStdImage->m_pBitmap->GetHeight(); }
void Reset();
protected:
CGdiPlusBitmapResource* m_pStdImage;
//CDC* m_pCurBtn; // current pointer to one of the above
//CDC m_dcStd; // standard button
//CDC m_dcBk;
};