A sample of use
Below is the part of the
WM_PAINT
(OnDraw) event handler:
#include "ean128.h"
void OnDraw(HDC dc)
{
EAN_128::EAN128 Ean128;
int xres=::GetDeviceCaps(dc,LOGPIXELSX);
int yres=::GetDeviceCaps(dc,LOGPIXELSY);
Ean128.SetXResolution(xres);
Ean128.SetYResolution(yres);
Ean128.SetOneModuleWidth(0.25);
Ean128.Reset();
Ean128.AddPiece(_T("1234567890"));
Ean128.AddPiece(_T("abcdef"));
Ean128.Draw(dc,100,200,50,RGB(0,0,255));
}