//======================
//		LocalErrors.H		
//

#ifndef __LOCALERRORS_H_
#define __LOCALERRORS_H_

enum ERRORTYPE 
{
	NULL_ERROR,			// no error
	USER_ERROR,
	INFORMATION,
	NON_CRITICAL,
	SEVERE_ERROR,
	RETRY_ERROR,
	POPUP_MESSAGE		// special for popup window
};

enum POPUP_ALIGNMENT
{
	POPUP_TOP = 0,		// default position is reference point above
	POPUP_LEFT = 0,	// default position is reference point at left
	POPUP_RIGHT = 2,
	POPUP_BOTTOM = 4
};

typedef struct tag_ERRORMSG
{
	CString		csErrorString;
	UINT		nErrorCode;
	ERRORTYPE	ErrorType;
}	ERRORMSG;


enum RESULTTYPE
{
	RESULT_OK = IDOK,	
	RESULT_LOG_LOCAL,
	RESULT_REPORT_ERROR,
	RESULT_CANCEL = IDCANCEL
};

EXPORT int  CALLBACK ReportErrorStd( HKEY	  hAppKey,
									 ERRORMSG errMsg, 
									 UINT	  delay = 0,
									 CString  csCaptions = "",
									 CString  csTitle = "" );
EXPORT void CALLBACK ReportPopup( ERRORMSG errMsg, UINT delay, 
								  CPoint cPoint, WORD wAlign );

#endif	// __LOCALERRORS_H_
