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] | customData | User-defined data. |
[in,out] | barcode | The handle of the barcode. |
[in,out] | drawDC | The device context. |
[in,out] | targetDC | The target device context. |
[in] | x | The left coordinate of the row. |
[in] | y | The top coordinate of the row. |
[in] | width | The width of the row. |
[in] | height | The height of the row. |
- Return values:
-
| ErrOk | Everything went fine, and the drawing continues. |
| !=ErrOk | Something went wrong, the drawing function returns with the returned error value. |
- See also:
- BCGetFuncDrawRow(), BCSetFuncDrawRow(), BCDrawCB(), BCGetMetaData()