// GDICanvas.h: interface for the CGDICanvas class.
#if !defined(AFX_GDICANVAS_H__F5EB4F68_2CBC_11D4_A1EE_8F7A3049432E__INCLUDED_)
#define AFX_GDICANVAS_H__F5EB4F68_2CBC_11D4_A1EE_8F7A3049432E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <windows.h>

class CGDICanvas  
{
public:
			CGDICanvas		();//constructor
			~CGDICanvas		();//destructor

	void	Load			(HDC hdcCompatible, LPCTSTR lpszFilename);		//loads bitmap from a file
	void	CreateBlank		(HDC hdcCompatible, int width, int height);		//creates a blank bitmap	
	void	Destroy			();//destroys bitmap and dc
	int		GetWidth		();//return width
	int		GetHeight		();//return height

	operator HDC();//converts to HDC

private:
	HDC		hdcMem;		//memory dc
	HBITMAP hbmNew;		//new bitmap
	HBITMAP hbmOld;		//old bitmap
	int		nWidth;		//width and height
	int		nHeight;
public:
};
#endif