Initial Upload Week 4 [19/10]
This commit is contained in:
26
Bitmap.h
Normal file
26
Bitmap.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include "windows.h"
|
||||
|
||||
class Bitmap
|
||||
{
|
||||
public:
|
||||
Bitmap();
|
||||
~Bitmap();
|
||||
|
||||
bool Create(HWND hWnd, unsigned int width, unsigned int height);
|
||||
HDC GetDC() const;
|
||||
unsigned int GetWidth() const;
|
||||
unsigned int GetHeight() const;
|
||||
void Clear(HBRUSH hBrush) const;
|
||||
void Clear(COLORREF colour) const;
|
||||
|
||||
private:
|
||||
HBITMAP _hBitmap{ 0 };
|
||||
HBITMAP _hOldBitmap{ 0 };
|
||||
HDC _hMemDC{ 0 };
|
||||
unsigned int _width{ 0 };
|
||||
unsigned int _height{ 0 };
|
||||
|
||||
void DeleteBitmap();
|
||||
};
|
||||
|
Reference in New Issue
Block a user