Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 766 git-svn-id: svn://10.65.10.50/trunk@14628 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			375 lines
		
	
	
		
			16 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			375 lines
		
	
	
		
			16 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| // VC_TestView.cpp : implementation of the CVC_TestView class
 | |
| //
 | |
| 
 | |
| #include "stdafx.h"
 | |
| #include "VC_Test.h"
 | |
| 
 | |
| #include "VC_TestDoc.h"
 | |
| #include "VC_TestView.h"
 | |
| 
 | |
| #ifdef _DEBUG
 | |
| #define new DEBUG_NEW
 | |
| #undef THIS_FILE
 | |
| static char THIS_FILE[] = __FILE__;
 | |
| #endif
 | |
| 
 | |
| // PPLADLL Function Declaration start
 | |
| HINSTANCE hPPLA;
 | |
| typedef int (_stdcall *pfnA_Bar2d_Maxi)(int x,int y,long int primary,int secondary,int country,
 | |
| 								int service,char mode,int numeric,LPCTSTR data);
 | |
| typedef int (_stdcall *pfnA_Bar2d_Maxi_Ori)(int x,int y,int ori,long int primary,int secondary,int country,
 | |
| 								int service,char mode,int numeric,LPCTSTR data);
 | |
| typedef int (_stdcall *pfnA_Bar2d_PDF417)(int x,int y,int narrow,int width,char normal,int security,
 | |
| 					int aspect,int row,int column,char mode,int numeric,LPCTSTR data);
 | |
| typedef int (_stdcall *pfnA_Bar2d_PDF417_Ori)(int x,int y,int ori,int narrow,int width,char normal,
 | |
| 					int security,int aspect,int row,int column,char mode,int numeric,LPCTSTR data);
 | |
| typedef int (_stdcall *pfnA_Bar2d_DataMatrix)(int x, int y,int rotation,int hor_mul,int ver_mul,
 | |
| 						int ECC,int data_format,int num_rows,int num_col,char mode,int numeric,LPCTSTR data);
 | |
| typedef void (_stdcall *pfnA_Clear_Memory)(void);
 | |
| typedef void (_stdcall *pfnA_ClosePrn)(void);
 | |
| typedef int (_stdcall *pfnA_CreatePrn)(int selection, LPCTSTR filename = NULL);
 | |
| typedef int (_stdcall *pfnA_Del_Graphic)(int mem_mode,char graphic[10]);
 | |
| typedef int (_stdcall *pfnA_Draw_Box)(char mode,int x,int y,int width,int height,int top,int side);
 | |
| typedef int (_stdcall *pfnA_Draw_Line)(char mode,int x,int y,int width,int height);
 | |
| typedef void (_stdcall *pfnA_Feed_Label)(void);
 | |
| typedef LPTSTR (_stdcall *pfnA_Get_DLL_Version)(int nShowMessage);
 | |
| typedef int (_stdcall *pfnA_Get_DLL_VersionA)(int nShowMessage);
 | |
| typedef int (_stdcall *pfnA_Get_Graphic)(int x,int y,int mem_mode,char format,LPCTSTR filename);
 | |
| typedef int (_stdcall *pfnA_Get_Graphic_ColorBMP)(int x,int y,int mem_mode,char format,LPCTSTR filename);
 | |
| typedef int (_stdcall *pfnA_Initial_Setting)(int Type,LPCTSTR Source);
 | |
| typedef int (_stdcall *pfnA_Load_Graphic)(int x,int y,char graphic_name[10]);
 | |
| typedef int (_stdcall *pfnA_Open_ChineseFont)(char* path);
 | |
| typedef int (_stdcall *pfnA_Print_Form)(int width,int height,int copies,int amount,LPTSTR form_name);
 | |
| typedef int (_stdcall *pfnA_Print_Out)(int width,int height,int copies,int amount);
 | |
| typedef int (_stdcall *pfnA_Prn_Barcode)(int x,int y,int ori,char type,int narrow,int width,
 | |
|                         int height,char mode,int numeric,LPTSTR data);
 | |
| typedef int (_stdcall *pfnA_Prn_Text)(int x,int y,int ori,int font,int type,int hor_factor,
 | |
|                      int ver_factor,char mode,int numeric,LPCTSTR data);
 | |
| typedef int (_stdcall *pfnA_Prn_Text_Chinese)(int x,int y,int fonttype,LPCTSTR id_name,LPCTSTR data,int mem_mode);
 | |
| typedef int (_stdcall *pfnA_Prn_Text_TrueType)(int x,int y,int FSize,LPCTSTR FType,int Fspin,
 | |
| 						      int FWeight,int FItalic,int FUnline,int FStrikeOut,
 | |
| 					          LPCTSTR id_name,LPCTSTR data,int mem_mode);
 | |
| typedef int (_stdcall *pfnA_Prn_Text_TrueType_W)(int x, int y, int FHeight, int FWidth, LPCTSTR FType,
 | |
| 						int Fspin, int FWeight, int FItalic, int FUnline,
 | |
| 						int FStrikeOut, LPCTSTR id_name, LPCTSTR data, int mem_mode);
 | |
| typedef int (_stdcall *pfnA_Set_Backfeed)(int back);
 | |
| typedef int (_stdcall *pfnA_Set_BMPSave)(int nSave, char* pstrBMPFName);
 | |
| typedef int (_stdcall *pfnA_Set_Cutting)(int cutting);
 | |
| typedef int (_stdcall *pfnA_Set_Darkness)(int heat);
 | |
| typedef int (_stdcall *pfnA_Set_DebugDialog)(int nEnable);
 | |
| typedef int (_stdcall *pfnA_Set_Feed)(char rate);
 | |
| typedef int (_stdcall *pfnA_Set_Form)(LPCTSTR formfile,LPCTSTR form_name,int mem_mode);
 | |
| typedef int (_stdcall *pfnA_Set_Margin)(int position,int margin);
 | |
| typedef int (_stdcall *pfnA_Set_Prncomport)(int baud, int parity, int data, int stop);
 | |
| typedef int (_stdcall *pfnA_Set_Prncomport_PC)(int nBaudRate, int nByteSize, int nParity,
 | |
| 					int nStopBits, int nDsr, int nCts, int nXonXoff);
 | |
| typedef int (_stdcall *pfnA_Set_Sensor_Mode)(char type,int continuous);
 | |
| typedef int (_stdcall *pfnA_Set_Speed)(char speed);
 | |
| typedef int (_stdcall *pfnA_Set_Syssetting)(int transfer,int cut_peel,int length,int zero,int pause);
 | |
| typedef int (_stdcall *pfnA_Set_Unit)(char unit);
 | |
| typedef int (_stdcall *pfnA_Set_Logic)(int logic);
 | |
| typedef int (_stdcall *pfnA_Set_ProcessDlg)(int nShow);
 | |
| typedef int (_stdcall *pfnA_Set_LabelVer)(int centiInch);
 | |
| typedef int (_stdcall *pfnA_GetUSBBufferLen)(void);
 | |
| typedef int (_stdcall *pfnA_EnumUSB)(char *buf);
 | |
| typedef int (_stdcall *pfnA_CreateUSBPort)(int nPort);
 | |
| 
 | |
| pfnA_Bar2d_Maxi				A_Bar2d_Maxi			= NULL;
 | |
| pfnA_Bar2d_Maxi_Ori			A_Bar2d_Maxi_Ori		= NULL;
 | |
| pfnA_Bar2d_PDF417			A_Bar2d_PDF417			= NULL;
 | |
| pfnA_Bar2d_PDF417_Ori		A_Bar2d_PDF417_Ori		= NULL;
 | |
| pfnA_Bar2d_DataMatrix		A_Bar2d_DataMatrix		= NULL;
 | |
| pfnA_Clear_Memory			A_Clear_Memory			= NULL;
 | |
| pfnA_ClosePrn				A_ClosePrn				= NULL;
 | |
| pfnA_CreatePrn				A_CreatePrn				= NULL;
 | |
| pfnA_Del_Graphic			A_Del_Graphic			= NULL;
 | |
| pfnA_Draw_Box				A_Draw_Box				= NULL; 
 | |
| pfnA_Draw_Line				A_Draw_Line				= NULL;
 | |
| pfnA_Feed_Label				A_Feed_Label			= NULL;
 | |
| pfnA_Get_DLL_Version		A_Get_DLL_Version		= NULL;
 | |
| pfnA_Get_DLL_VersionA		A_Get_DLL_VersionA		= NULL;
 | |
| pfnA_Get_Graphic			A_Get_Graphic			= NULL;
 | |
| pfnA_Get_Graphic_ColorBMP	A_Get_Graphic_ColorBMP	= NULL;
 | |
| pfnA_Initial_Setting		A_Initial_Setting		= NULL;
 | |
| pfnA_Load_Graphic			A_Load_Graphic			= NULL;
 | |
| pfnA_Open_ChineseFont		A_Open_ChineseFont		= NULL;
 | |
| pfnA_Print_Form				A_Print_Form			= NULL;
 | |
| pfnA_Print_Out				A_Print_Out				= NULL;
 | |
| pfnA_Prn_Barcode			A_Prn_Barcode			= NULL;
 | |
| pfnA_Prn_Text				A_Prn_Text				= NULL;
 | |
| pfnA_Prn_Text_Chinese		A_Prn_Text_Chinese		= NULL;
 | |
| pfnA_Prn_Text_TrueType		A_Prn_Text_TrueType		= NULL;
 | |
| pfnA_Prn_Text_TrueType_W	A_Prn_Text_TrueType_W	= NULL;
 | |
| pfnA_Set_Backfeed			A_Set_Backfeed			= NULL;
 | |
| pfnA_Set_BMPSave			A_Set_BMPSave			= NULL;
 | |
| pfnA_Set_Cutting			A_Set_Cutting			= NULL;
 | |
| pfnA_Set_Darkness			A_Set_Darkness			= NULL;
 | |
| pfnA_Set_DebugDialog		A_Set_DebugDialog		= NULL;
 | |
| pfnA_Set_Feed				A_Set_Feed				= NULL;
 | |
| pfnA_Set_Form				A_Set_Form				= NULL;
 | |
| pfnA_Set_Margin				A_Set_Margin			= NULL;
 | |
| pfnA_Set_Prncomport			A_Set_Prncomport		= NULL;
 | |
| pfnA_Set_Prncomport_PC		A_Set_Prncomport_PC		= NULL;
 | |
| pfnA_Set_Sensor_Mode		A_Set_Sensor_Mode		= NULL;
 | |
| pfnA_Set_Speed				A_Set_Speed				= NULL;
 | |
| pfnA_Set_Syssetting			A_Set_Syssetting		= NULL;
 | |
| pfnA_Set_Unit				A_Set_Unit				= NULL;
 | |
| pfnA_Set_Logic				A_Set_Logic				= NULL;
 | |
| pfnA_Set_ProcessDlg			A_Set_ProcessDlg		= NULL;
 | |
| pfnA_Set_LabelVer			A_Set_LabelVer			= NULL;
 | |
| pfnA_GetUSBBufferLen		A_GetUSBBufferLen		= NULL;
 | |
| pfnA_EnumUSB				A_EnumUSB				= NULL;
 | |
| pfnA_CreateUSBPort			A_CreateUSBPort			= NULL;
 | |
| // PPLADLL Function Declaration end
 | |
| 
 | |
| /////////////////////////////////////////////////////////////////////////////
 | |
| // CVC_TestView
 | |
| 
 | |
| IMPLEMENT_DYNCREATE(CVC_TestView, CView)
 | |
| 
 | |
| BEGIN_MESSAGE_MAP(CVC_TestView, CView)
 | |
| 	//{{AFX_MSG_MAP(CVC_TestView)
 | |
| 	ON_WM_LBUTTONDOWN()
 | |
| 	//}}AFX_MSG_MAP
 | |
| END_MESSAGE_MAP()
 | |
| 
 | |
| /////////////////////////////////////////////////////////////////////////////
 | |
| // CVC_TestView construction/destruction
 | |
| 
 | |
| CVC_TestView::CVC_TestView()
 | |
| {
 | |
| 	// Load Library start
 | |
| 	VERIFY(hPPLA = ::LoadLibrary("WINPPLA.DLL"));
 | |
| 	VERIFY(A_Bar2d_Maxi = (pfnA_Bar2d_Maxi) ::GetProcAddress(hPPLA,"A_Bar2d_Maxi"));
 | |
| 	VERIFY(A_Bar2d_Maxi_Ori = (pfnA_Bar2d_Maxi_Ori) ::GetProcAddress(hPPLA,"A_Bar2d_Maxi_Ori"));
 | |
| 	VERIFY(A_Bar2d_PDF417 = (pfnA_Bar2d_PDF417) ::GetProcAddress(hPPLA,"A_Bar2d_PDF417"));
 | |
| 	VERIFY(A_Bar2d_PDF417_Ori = (pfnA_Bar2d_PDF417_Ori) ::GetProcAddress(hPPLA,"A_Bar2d_PDF417_Ori"));
 | |
| 	VERIFY(A_Bar2d_DataMatrix = (pfnA_Bar2d_DataMatrix) ::GetProcAddress(hPPLA,"A_Bar2d_DataMatrix"));
 | |
| 	VERIFY(A_Clear_Memory = (pfnA_Clear_Memory) ::GetProcAddress(hPPLA,"A_Clear_Memory"));
 | |
| 	VERIFY(A_ClosePrn = (pfnA_ClosePrn) ::GetProcAddress(hPPLA,"A_ClosePrn"));
 | |
| 	VERIFY(A_CreatePrn = (pfnA_CreatePrn) ::GetProcAddress(hPPLA,"A_CreatePrn"));
 | |
| 	VERIFY(A_Del_Graphic = (pfnA_Del_Graphic) ::GetProcAddress(hPPLA,"A_Del_Graphic"));
 | |
| 	VERIFY(A_Draw_Box = (pfnA_Draw_Box) ::GetProcAddress(hPPLA,"A_Draw_Box"));
 | |
| 	VERIFY(A_Draw_Line = (pfnA_Draw_Line) ::GetProcAddress(hPPLA,"A_Draw_Line"));
 | |
| 	VERIFY(A_Feed_Label = (pfnA_Feed_Label) ::GetProcAddress(hPPLA,"A_Feed_Label"));
 | |
| 	VERIFY(A_Get_DLL_Version = (pfnA_Get_DLL_Version) ::GetProcAddress(hPPLA,"A_Get_DLL_Version"));
 | |
| 	VERIFY(A_Get_DLL_VersionA = (pfnA_Get_DLL_VersionA) ::GetProcAddress(hPPLA,"A_Get_DLL_VersionA"));
 | |
| 	VERIFY(A_Get_Graphic = (pfnA_Get_Graphic) ::GetProcAddress(hPPLA,"A_Get_Graphic"));
 | |
| 	VERIFY(A_Get_Graphic_ColorBMP = (pfnA_Get_Graphic_ColorBMP) ::GetProcAddress(hPPLA,"A_Get_Graphic_ColorBMP"));
 | |
| 	VERIFY(A_Initial_Setting = (pfnA_Initial_Setting) ::GetProcAddress(hPPLA,"A_Initial_Setting"));
 | |
| 	VERIFY(A_Load_Graphic = (pfnA_Load_Graphic) ::GetProcAddress(hPPLA,"A_Load_Graphic"));
 | |
| 	VERIFY(A_Open_ChineseFont = (pfnA_Open_ChineseFont) ::GetProcAddress(hPPLA,"A_Open_ChineseFont"));
 | |
| 	VERIFY(A_Print_Form = (pfnA_Print_Form) ::GetProcAddress(hPPLA,"A_Print_Form"));
 | |
| 	VERIFY(A_Print_Out = (pfnA_Print_Out) ::GetProcAddress(hPPLA,"A_Print_Out"));
 | |
| 	VERIFY(A_Prn_Barcode = (pfnA_Prn_Barcode) ::GetProcAddress(hPPLA,"A_Prn_Barcode"));
 | |
| 	VERIFY(A_Prn_Text = (pfnA_Prn_Text) ::GetProcAddress(hPPLA,"A_Prn_Text"));
 | |
| 	VERIFY(A_Prn_Text_Chinese = (pfnA_Prn_Text_Chinese) ::GetProcAddress(hPPLA,"A_Prn_Text_Chinese"));
 | |
| 	VERIFY(A_Prn_Text_TrueType = (pfnA_Prn_Text_TrueType) ::GetProcAddress(hPPLA,"A_Prn_Text_TrueType"));
 | |
| 	VERIFY(A_Prn_Text_TrueType_W = (pfnA_Prn_Text_TrueType_W) ::GetProcAddress(hPPLA,"A_Prn_Text_TrueType_W"));
 | |
| 	VERIFY(A_Set_Backfeed = (pfnA_Set_Backfeed) ::GetProcAddress(hPPLA,"A_Set_Backfeed"));
 | |
| 	VERIFY(A_Set_BMPSave = (pfnA_Set_BMPSave) ::GetProcAddress(hPPLA,"A_Set_BMPSave"));
 | |
| 	VERIFY(A_Set_Cutting = (pfnA_Set_Cutting) ::GetProcAddress(hPPLA,"A_Set_Cutting"));
 | |
| 	VERIFY(A_Set_Darkness = (pfnA_Set_Darkness) ::GetProcAddress(hPPLA,"A_Set_Darkness"));
 | |
| 	VERIFY(A_Set_Feed = (pfnA_Set_Feed) ::GetProcAddress(hPPLA,"A_Set_Feed"));
 | |
| 	VERIFY(A_Set_Form = (pfnA_Set_Form) ::GetProcAddress(hPPLA,"A_Set_Form"));
 | |
| 	VERIFY(A_Set_Margin = (pfnA_Set_Margin) ::GetProcAddress(hPPLA,"A_Set_Margin"));
 | |
| 	VERIFY(A_Set_Prncomport = (pfnA_Set_Prncomport) ::GetProcAddress(hPPLA,"A_Set_Prncomport"));
 | |
| 	VERIFY(A_Set_Prncomport_PC = (pfnA_Set_Prncomport_PC) ::GetProcAddress(hPPLA,"A_Set_Prncomport_PC"));
 | |
| 	VERIFY(A_Set_Sensor_Mode = (pfnA_Set_Sensor_Mode) ::GetProcAddress(hPPLA,"A_Set_Sensor_Mode"));
 | |
| 	VERIFY(A_Set_Speed = (pfnA_Set_Speed) ::GetProcAddress(hPPLA,"A_Set_Speed"));
 | |
| 	VERIFY(A_Set_Syssetting = (pfnA_Set_Syssetting) ::GetProcAddress(hPPLA,"A_Set_Syssetting"));
 | |
| 	VERIFY(A_Set_Unit = (pfnA_Set_Unit) ::GetProcAddress(hPPLA,"A_Set_Unit"));
 | |
| 	VERIFY(A_Set_Logic = (pfnA_Set_Logic) ::GetProcAddress(hPPLA,"A_Set_Logic"));
 | |
| 	VERIFY(A_Set_ProcessDlg = (pfnA_Set_ProcessDlg) ::GetProcAddress(hPPLA,"A_Set_ProcessDlg"));
 | |
| 	VERIFY(A_Set_LabelVer = (pfnA_Set_LabelVer) ::GetProcAddress(hPPLA,"A_Set_LabelVer"));
 | |
| 	VERIFY(A_GetUSBBufferLen = (pfnA_GetUSBBufferLen) ::GetProcAddress(hPPLA,"A_GetUSBBufferLen"));
 | |
| 	VERIFY(A_EnumUSB = (pfnA_EnumUSB) ::GetProcAddress(hPPLA,"A_EnumUSB"));
 | |
| 	VERIFY(A_CreateUSBPort = (pfnA_CreateUSBPort) ::GetProcAddress(hPPLA,"A_CreateUSBPort"));
 | |
| // Load Library end
 | |
| 	// TODO: add construction code here
 | |
| 
 | |
| }
 | |
| 
 | |
| CVC_TestView::~CVC_TestView()
 | |
| {
 | |
| 	// Free Library start
 | |
| 	FreeLibrary(hPPLA);
 | |
| 	hPPLA					= NULL;
 | |
| 	A_Bar2d_Maxi			= NULL;
 | |
| 	A_Bar2d_Maxi_Ori		= NULL;
 | |
| 	A_Bar2d_PDF417			= NULL;
 | |
| 	A_Bar2d_PDF417_Ori		= NULL;
 | |
| 	A_Bar2d_DataMatrix		= NULL;
 | |
| 	A_Clear_Memory			= NULL;
 | |
| 	A_ClosePrn				= NULL;
 | |
| 	A_CreatePrn				= NULL;
 | |
| 	A_Del_Graphic			= NULL;
 | |
| 	A_Draw_Box				= NULL; 
 | |
| 	A_Draw_Line				= NULL;
 | |
| 	A_Feed_Label			= NULL;
 | |
| 	A_Get_DLL_Version		= NULL;
 | |
| 	A_Get_DLL_VersionA		= NULL;
 | |
| 	A_Get_Graphic			= NULL;
 | |
| 	A_Get_Graphic_ColorBMP	= NULL;
 | |
| 	A_Initial_Setting		= NULL;
 | |
| 	A_Load_Graphic			= NULL;
 | |
| 	A_Open_ChineseFont		= NULL;
 | |
| 	A_Print_Form			= NULL;
 | |
| 	A_Print_Out				= NULL;
 | |
| 	A_Prn_Barcode			= NULL;
 | |
| 	A_Prn_Text				= NULL;
 | |
| 	A_Prn_Text_Chinese		= NULL;
 | |
| 	A_Prn_Text_TrueType		= NULL;
 | |
| 	A_Prn_Text_TrueType_W	= NULL;
 | |
| 	A_Set_Backfeed			= NULL;
 | |
| 	A_Set_BMPSave			= NULL;
 | |
| 	A_Set_Cutting			= NULL;
 | |
| 	A_Set_Darkness			= NULL;
 | |
| 	A_Set_DebugDialog		= NULL;
 | |
| 	A_Set_Feed				= NULL;
 | |
| 	A_Set_Form				= NULL;
 | |
| 	A_Set_Margin			= NULL;
 | |
| 	A_Set_Prncomport		= NULL;
 | |
| 	A_Set_Prncomport_PC		= NULL;
 | |
| 	A_Set_Sensor_Mode		= NULL;
 | |
| 	A_Set_Speed				= NULL;
 | |
| 	A_Set_Syssetting		= NULL;
 | |
| 	A_Set_Unit				= NULL;
 | |
| 	A_Set_Logic				= NULL;
 | |
| 	A_Set_ProcessDlg		= NULL;
 | |
| 	A_Set_LabelVer			= NULL;
 | |
| 	A_GetUSBBufferLen		= NULL;
 | |
| 	A_EnumUSB				= NULL;
 | |
| 	A_CreateUSBPort			= NULL;
 | |
| 	// Free Library end
 | |
| }
 | |
| 
 | |
| BOOL CVC_TestView::PreCreateWindow(CREATESTRUCT& cs)
 | |
| {
 | |
| 	// TODO: Modify the Window class or styles here by modifying
 | |
| 	//  the CREATESTRUCT cs
 | |
| 
 | |
| 	return CView::PreCreateWindow(cs);
 | |
| }
 | |
| 
 | |
| /////////////////////////////////////////////////////////////////////////////
 | |
| // CVC_TestView drawing
 | |
| 
 | |
| void CVC_TestView::OnDraw(CDC* pDC)
 | |
| {
 | |
| 	CVC_TestDoc* pDoc = GetDocument();
 | |
| 	ASSERT_VALID(pDoc);
 | |
| 	pDC->TextOut(0,0,"Please press mouse's left button.");
 | |
| }
 | |
| 
 | |
| /////////////////////////////////////////////////////////////////////////////
 | |
| // CVC_TestView diagnostics
 | |
| 
 | |
| #ifdef _DEBUG
 | |
| void CVC_TestView::AssertValid() const
 | |
| {
 | |
| 	CView::AssertValid();
 | |
| }
 | |
| 
 | |
| void CVC_TestView::Dump(CDumpContext& dc) const
 | |
| {
 | |
| 	CView::Dump(dc);
 | |
| }
 | |
| 
 | |
| CVC_TestDoc* CVC_TestView::GetDocument() // non-debug version is inline
 | |
| {
 | |
| 	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVC_TestDoc)));
 | |
| 	return (CVC_TestDoc*)m_pDocument;
 | |
| }
 | |
| #endif //_DEBUG
 | |
| 
 | |
| /////////////////////////////////////////////////////////////////////////////
 | |
| // CVC_TestView message handlers
 | |
| 
 | |
| void CVC_TestView::OnLButtonDown(UINT nFlags, CPoint point) 
 | |
| {
 | |
| 	CClientDC dc(this);
 | |
| 	dc.TextOut(point.x,point.y,"You press!");
 | |
| 	int	nUSBDataLen;
 | |
| 	char *pbuf;
 | |
| 
 | |
| 	//PPLADLL Test code start
 | |
| 	A_CreatePrn(1,NULL);
 | |
| 
 | |
| 	// USB Port Open
 | |
| 	/*nUSBDataLen = A_GetUSBBufferLen()+1;
 | |
| 	pbuf = (char *)new char[nUSBDataLen];
 | |
| 	memset(pbuf, 0, nUSBDataLen);
 | |
| 	A_EnumUSB(pbuf);
 | |
| 	A_CreateUSBPort(1);*/
 | |
| 	
 | |
| 	//A_Feed_Label();
 | |
| 	A_Clear_Memory();
 | |
| 	//A_Set_Backfeed(int back);
 | |
| //	A_Set_Backfeed(220);
 | |
| 	//A_Set_Cutting(int cutting);
 | |
| //	A_Set_Cutting(0);
 | |
| 	//A_Set_Darkness(int heat);
 | |
| 	A_Set_Darkness(8);
 | |
| //	A_Set_ProcessDlg(1);
 | |
| /*	//A_Set_Feed(char rate);
 | |
| 	A_Set_Feed('K');
 | |
| 	//A_Set_Margin(int position,int margin);
 | |
| 	A_Set_Margin(100,100);
 | |
| 	//A_Set_Sensor_Mode(char type,int continuous);
 | |
| 	A_Set_Sensor_Mode('c',300);
 | |
| 	//A_Set_Speed(char speed);
 | |
| 	A_Set_Speed('e');
 | |
| 	//A_Set_Syssetting(int transfer,int cut_peel,int length,int zero,int pause);
 | |
| 	A_Set_Syssetting(2,4,1200,1,2);
 | |
| 	//A_Set_Unit(char unit);
 | |
| 	A_Set_Unit('n');
 | |
| */
 | |
| 	//A_Set_Form("demo.prn","demo",1);
 | |
| 	//A_Del_Graphic(1,"AA");
 | |
| 
 | |
| 	//A_Get_Graphic(275,50,1,'B',"bb.bmp"); // -> mono bmp file
 | |
| 	//A_Get_Graphic_ColorBMP(30,20,1,'B',"girl.bmp"); // -> Color bmp file
 | |
| 
 | |
| 	A_Prn_Text_TrueType(0,0,40,"Times New Roman",1,400,0,0,0,"AA","Library Test",1);
 | |
| 	// Get a truetype text
 | |
| 	A_Prn_Text_TrueType(5,50,30,"Arial",4,400,0,0,0,"AB","TrueType Font",1);
 | |
| 	// Get a truetype text
 | |
| 	//A_Prn_Text_TrueType(0,120,40,"Courier New",1,800,1,1,0,"AC","Color BMP --> Mono BMP",1);
 | |
| 	
 | |
| 	//for(int i=0; i<10; i++){
 | |
| 		A_Prn_Text(275,35,1,2,0,1,1,'n',2,"ARGOX");
 | |
| 		A_Prn_Text(310,35,1,9,0,1,1,'n',2,"PPLA COMMAND");
 | |
| 		A_Prn_Text(350,115,1,3,0,1,1,'n',2,"AUTO");
 | |
| 		A_Prn_Text(350,100,1,3,0,1,1,'a',1,"0001");
 | |
| 	
 | |
| 		A_Prn_Barcode(150,20,4,'A',0,0,20,'b',1,"ABCD");
 | |
| 		A_Prn_Barcode(305,80,1,'D',0,0,35,'a',1,"123");
 | |
| 		A_Bar2d_Maxi(155,0,32987,444,40,55,'n',2,"TO 123");
 | |
| 		A_Bar2d_PDF417(260,0,0,0,'f',0,0,10,2,'b',1,"ARGOXINFO");
 | |
| 
 | |
| 		A_Draw_Line('n',275,80,30,2);
 | |
| 		A_Draw_Line('n',275,85,30,2);
 | |
| 		A_Draw_Line('n',275,90,30,2);
 | |
| 		A_Draw_Line('n',275,95,30,2);
 | |
| 		A_Draw_Line('n',295,77,2,30);
 | |
| 		A_Draw_Line('a',285,77,2,30);
 | |
| 		A_Draw_Box('n',260,30,130,105,4,4);
 | |
| 		
 | |
| 		// Recall to send command for loading without image
 | |
| 	/*	A_Load_Graphic(275,50,"bb");
 | |
| 		A_Load_Graphic(0,0,"AA");
 | |
| 		A_Load_Graphic(5,30,"AB");
 | |
| 		A_Load_Graphic(0,120,"AC");*/
 | |
| 
 | |
| 		A_Print_Out(1,1,2,1);
 | |
| 		//A_Print_Form(1,1,1,1,"demo");
 | |
| 		//}
 | |
| 
 | |
| 	A_ClosePrn();
 | |
| 	//PPLADLL Test code end
 | |
| 
 | |
| 	
 | |
| 	CView::OnLButtonDown(nFlags, point);
 | |
| }
 |