#ifndef FACEREC_FRONTEND_H
#define FACEREC_FRONTEND_H 1

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

// Warns that Controls::Init is actually a constructor ..
// But I explicitly over-ride it !
#pragma warning( disable : 4183 ) 

#define TRAIN_BTN 100
#define RECOGN_BTN 101
#define FEXT_BTN 102
#define EXIT_BTN 103
#define STATUS_TEXT 104

#define MSG_GETFOCUS 30023

extern char szName[200];
extern char szPath[200];

class Controls {

	char buf[256];
	
	HWND hWndTrain;   
	HWND hWndRecogn;   
	HWND hWndFExt;
	HWND hWndExit;
	HWND hWndStat;

	HWND hWnd;
	HINSTANCE hInst;

public:
	Controls() {}

	HWND GetTrainBtn() { return hWndTrain; }
	HWND GetRecognBtn() { return hWndRecogn; }
	HWND GetFextBtn() { return hWndFExt; }
	HWND GetExitBtn() { return hWndExit; }
	HWND GetStatText() { return hWndStat; }
	HWND GetMainWin() { return hWnd; }

	HINSTANCE GethInst() {return hInst; }

	void StatPrintf(const char * szFmt,...) ;
	void PostStatMsg(char* szStatStr) ;
	void PostDefStatMsg( void ) ;
	void Init(HWND _hWnd,HINSTANCE _hInst) ;

	void DisableControls ();
	void EnableControls ();

	~Controls();
};

extern Controls Ctrs;

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, INT iCmdShow);
BOOL CALLBACK ButtonProc(HWND hDlg, UINT message, WPARAM wParam, 
                         LPARAM lParam) ;
VOID OnPaint(HDC hdc);
void OnCreate();

void OnTrain ();
void OnRecog ();
void OnFext  ();
void OnSplash();

#endif FACEREC_FRONTEND_H