TBarCode Library 11  TBarCode Library 11
typedef ERRCODE( * fn_DrawRow)(VOID *customData, t_BarCode *barcode, HDC drawDC, HDC targetDC, DOUBLE x, DOUBLE y, DOUBLE width, DOUBLE height)

Callback-function which is called instead of drawing a barcode row.

This callback function can be set with BCSetFuncDrawRow(). When set the drawing functions such as BCDraw(), BCPostscriptToFile, BCPCLToFile() etc. do not generate any output. Instead they call the active callback function.
When Windows-GDI drawing is started (with BCDraw()) then drawDC, targetDC contain the Windows device contexts (if set).
The parameters x, y, width, and height specify the extent of the barcode row. If drawDC and targetDC are not set then these variables are given in millimeters, where the origin of the coordinate system is the upper, left coordinate of the barcode. The positive X-axis points to the right and the positive Y-axis points downwards.
If drawDC or targetDC are set then the parameters x, y, width, and height use the current logical coordinate system and the logical units of these device contexts.
In your callback function you can use BCGetMetaData() to query the bars and spaces of the current row.

Note:
A barcode row in this case is a single row of bars. Linear (1-dimensional) barcodes have exactly one row of bars. 2-dimensional barcodes can have more than one row of bars: In this case this callback function is called once for each row.
The user-defined data (customData) is shared by all callback functions.
The TBarCode Callback functions can be used only with a developer license. Sample code is available on request: support@tec-it.com
Parameters:
[in,out]customDataUser-defined data.
[in,out]barcodeThe handle of the barcode.
[in,out]drawDCThe device context.
[in,out]targetDCThe target device context.
[in]xThe left coordinate of the row.
[in]yThe top coordinate of the row.
[in]widthThe width of the row.
[in]heightThe height of the row.
Return values:
ErrOkEverything went fine, and the drawing continues.
!=ErrOkSomething went wrong, the drawing function returns with the returned error value.
See also:
BCGetFuncDrawRow(), BCSetFuncDrawRow(), BCDrawCB(), BCGetMetaData()