A sample of use
Below is the part of the
WM_PAINT
(OnDraw) event handler:
#include "code128.h"
void OnDraw(HDC dc)
{
CODE_128::CODE128 Code128;
int xres=::GetDeviceCaps(dc,LOGPIXELSX);
int yres=::GetDeviceCaps(dc,LOGPIXELSY);
Code128.SetXResolution(xres);
Code128.SetYResolution(yres);
Code128.SetOneModuleWidth(0.25);
Code128.SetCodeString("123456789012345678901234567890");
Code128.Draw(dc,100,200,50,RGB(0,0,255));
}