dLSoft                software for barcodes and labelling                     

     HOME    PRODUCTS     DEVELOPERS     DOWNLOADS     SALES     SUPPORT     SERVICES     CONTACT US

Sample C++ source code for dBarcode DLL

Code draws a vector barcode image in the device context passed to the OnDraw() method, using the barcode data in theApp.bc.

void CVc32demoView::OnDraw(CDC* pDC)
{
extern CVc32demoApp theApp;

// TODO: add draw code for native data here
TCHAR mess[64];
RECT trect;
BOOL bmono;

HDC hdc=pDC->m_hDC;
trect.left=2000;
trect.right=5000;
trect.top=4000;
trect.bottom=6000;
i=BarDraw(pDC->m_hDC,(LPRECT)&trect,(LPBARC)&theApp.bc, (LPLOGFONT)&theApp.lf);
if (theApp.bc.error>0)
   {
       //error handling;
   }
}