TBarCode Library 11  TBarCode Library 11
typedef ERRCODE( * fn_DrawBar)(VOID *customData, HDC drawDC, DOUBLE x, DOUBLE y, DOUBLE width, DOUBLE height)

Data type for custom bar-drawing callback-function.

This callback function can be set with BCSetFuncDrawBar(). When set the drawing functions such as BCDraw(), BCPostscriptToFile, BCPCLToFile() etc. do not generate any output. Instead they call the active callback function. This function is called once for each bar.
When Windows-GDI drawing is started (with BCDraw()) then drawDC contains the Windows device contexts (if set). The variables x, y, width, and height specify the extent of the bar. 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.

Note:
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]drawDCThe 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:
BCGetFuncDrawBar(), BCSetFuncDrawBar(), BCDrawCB()