#pragma once

#include <windows.h>
#include <exception>
#include <string>


	class Form
	{
	public:
		Form(HINSTANCE appInstanceHandle);
		virtual ~Form(void);
		
		// Shows our window then starts processing the message loop
		int Run(int showCmd);

		// setter for the window caption
		void SetCaption( std::wstring windowCaption );

		// setters for width and height;
		void SetWidth( int windowWidth );
		void SetHeight( int windowHeight );

	protected:
		// Creates our form, much like InitWindow from before
		virtual bool initialiseWindow(HINSTANCE appInstanceHandle);
		// Message handler
		virtual LRESULT WndProc(HWND windowHandle, UINT message, WPARAM wParam, LPARAM lParam);
		static LRESULT CALLBACK MainWndProc(HWND windowHandle, UINT message, WPARAM wParam, LPARAM lParam);
		
		// stores the handle for the window
		HWND formWindowHandle;
		HINSTANCE appInstanceHandle;

		int width;
		int height;
		std::wstring windowCaption;

		
	};



