#ifndef FACEREC_STARTUP_H
#define FACEREC_STARTUP_H 1

#include <windows.h>
#include <gdiplus.h>
#include <commctrl.h>

/*	Provides for automatic initialization of GDI+
	if a global object is created ... or an object is
	made a member of another global object
	
	check StartUp.cpp for objects
*/
class GdiPlusAutomaticStartup {
	Gdiplus::GdiplusStartupInput gdiplusStartupInput;
	ULONG_PTR           gdiplusToken;
public:
	   // Initialize GDI+.
	GdiPlusAutomaticStartup() {
		Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
	}
	~GdiPlusAutomaticStartup() {
		Gdiplus::GdiplusShutdown(gdiplusToken);
	}
};

class CommonControlsStartup {
public:
	CommonControlsStartup() {
		InitCommonControls();
	}
};

/*	This Class provides for automatic Initialization of
	all reqd subsystems
*/
class GlobalStartup {
	
	GdiPlusAutomaticStartup GdiPlusAutomaticStartupObject;
	CommonControlsStartup CommonControlsStartupObject;
	// All Global Startup Objects Placed here In Order of Init ...

};

#endif FACEREC_STARTUP_H