#pragma once

#include <windows.h>

#include "D2D1.h"
#pragma comment(lib, "D2D1.lib")

#include "grabWindowMessage.h"
#include <string>
#include "grabFactory.h"
#include "grabSprite.h"

class grabWindow {
private:
	void ResetVariables();
	static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

public:
	grabWindow();
	grabWindow(grabFactory* factory, std::wstring title, int width, int height);

	void GetWindowMessage(grabWindowMessage* Message);
		
	void DrawSprite(grabSprite* spr);

	void Cleanup();

	HWND hWnd;
	MSG msg;
	ID2D1HwndRenderTarget* rt;
	grabFactory* Factory;
	bool IsOpened;
};