Home|Download|Buy online|Affiliates|Search|Feedback|Site Map|ReviewsUse our online RSS & XML news feeds to get the latest news about our products delivered to your desktop... RSS feed    04.02.2012
Home»UPC-A barcode»SDK
Find out more how to use BestView...
A sample of use

An example of usage

Below is the part of the WM_PAINT (OnDraw) event handler:

		
	#include "upc_a.h"
	
	void OnDraw(HDC dc)
	    {
	    // =========================================================== 
	    // =              Start barcode drawing                      = 
	    // =========================================================== 
	    // An instance of the class 
	    UPC_A::UPC_A UpcA;
	    // The horizontal resolution of the output device
	    int xres=::GetDeviceCaps(dc,LOGPIXELSX); 
	    // The vertical resolution of the output device
	    int yres=::GetDeviceCaps(dc,LOGPIXELSY);
	
	    // The initialization of the instance of the class
	    UpcA.SetXResolution(xres);  
	    UpcA.SetYResolution(yres);
	    
	    // Our barcode will contain the number 03600029145
	    // and the Addon number 21826
	    UpcA.SetNumber(_T("03600029145"),_T("21826"));
	    
	    // Now we are ready to draw the barcode
	    // Draw the barcode!
	    UpcA.Draw(dc,100,200); 
	    // That is all! 
	    // =========================================================== 
	    // =                End barcode drawing                      = 
	    // =========================================================== 
	    }
		
Valid HTML 4.01 Transitional© PVL team, 2004-2012, all rights reserved. This Web site and its entire contents are for personal use only and may not be copied, reproduced, modified, published or distributed in any way,without PVL team's prior written permission.