// MyBitmap.h: interface for the CMyBitmap class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_MYBITMAP_H__C44FEA4F_0C0F_4958_AF97_4A20FF73781C__INCLUDED_) #define AFX_MYBITMAP_H__C44FEA4F_0C0F_4958_AF97_4A20FF73781C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "Card.h" // The Representation of a 32 bit color table entry #pragma pack(push) #pragma pack(1) typedef struct ssBGR { unsigned char b; unsigned char g; unsigned char r; unsigned char pad; } sBGR; typedef sBGR *pBGR; #pragma pack(pop) class CMyBitmap : public CBitmap { public: void createBitmap(CWnd *pWnd, Card card, int width, int height); CMyBitmap(); virtual ~CMyBitmap(); void DrawSprite(CDC *pDC, COLORREF transColor, int ix, int iy); void Draw(CDC *pDC, int ix, int iy, BOOL forceBackgroundPalette=TRUE); BOOL LoadBitmapFromFile(LPCTSTR szFilename); int Width(); int Height(); private: int m_cy; int m_cx; CPalette m_palette; }; #endif // !defined(AFX_MYBITMAP_H__C44FEA4F_0C0F_4958_AF97_4A20FF73781C__INCLUDED_)