#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "MPosControllerDevices.h"

typedef int	 (__stdcall *pDisplayString)(int bgtId, LPCTSTR data, int codePage, int internationalCharacterSet, int line);
typedef int	 (__stdcall *pClearScreen)(int bgtId);
typedef int	 (__stdcall *pStoreImageFile)(int bgtId, LPCTSTR filename, int width, int imageNumber);
typedef int	 (__stdcall *pDisplayImage)(int bgtId, int imageNumber, int xPos, int yPos);
typedef int	 (__stdcall *pClearImage)(int bgtId, int imageNumber);
typedef int	 (__stdcall *pShowCursor)(int bgtId, int cursor);

class CMPosControllerBCD : public CMPosControllerDevices
{
	public:
		CMPosControllerBCD();
		~CMPosControllerBCD();

		int displayString(LPCTSTR data, int codePage, int internationalCharacterSet, int line);
		int clearScreen();
		int storeImageFile(LPCTSTR filename, int width, int imageNumber);
		int displayImage(int imageNumber, int xPos, int yPos);
		int clearImage(int imageNumber);
		int showCursor(int cursor);

	protected:
		int nBgtId;

	private:
		bool LoadDll();
			
		pDisplayString		fdisplayString;
		pClearScreen		fclearScreen;
		pStoreImageFile		fstoreImageFile;
		pDisplayImage		fdisplayImage;
		pClearImage			fclearImage;
		pShowCursor			fshowCursor;		
};