Calls to BarCodeb create the barcode bitmap image and the image pattern (for developers who wish to draw their own bars), returning an error code in the barcode structure in the event of an error. The bitmap handle is returned both in the hbm parameter and via the pointer returned.
LPHANDLE WINAPI BarCodeb(HANDLE hInstance, LPRECT lpRectIn, LPLOGFONT lpLogFontIn, LPBAR bc, LPHANDLE &hbm, LPSTR szPat)
where
hInstance is the instance handle of the calling application or 0.
lpRectIn is a long pointer to a rectangle that is the destination rectangle for the barcode image (with coordinates in units of 0.01 mm).
lpLogFontIn is a long pointer to a LOGFONT structure filled with information about the font with which any text will be displayed on the barcode. The font height will be treated as Points and treated as positive.
bc is a BARCODE structure - the LPBAR cast is required.
hbm is a HBITMAP handle that will contain the handle of the bitmap on return.
szPat is a long pointer to a string that receives a pattern of 0s and 1s representing spaces and bars respectively. This variable must be declared as
char szPat[4096];
before calling the library routines - even if you do not intend to use the pattern. If your barcodes are not likely to exceed 12 characters in length, then the pattern string may be declared as szPat[1024].
Users should note that bitmaps are not as good as metafiles for barcode images, and can give rise to scanning problems.
More: