SetBarcodeValueSource

 

 

#include “BlackIceDEVMODE.h”

 

BOOL SetBarcodeValueSource (BlackIceDEVMODE* pDevMode, DWORD dwSource);

Description

Sets the source of the barcode value used for generating the barcode.

Parameters

BlackIceDEVMODE* pDevMode            - pointer to the BlackIceDEVMODE structure

 

DWORD dwSource                                    - can be one of the values of the BarcodeSource enumeration:

 

enum BarcodeSource

{

            BARCODE_STRING = 0,

            BARCODE_FILE,

            BARCODE_PAGE_CONTENT

};

If BARCODE_STRING (0) is specified, a simple string is used for the barcode value, set  by the SetBarcodeValue function or in the printing preferences.

If BARCODE_FILE (1) is specified, the file set by the SetBarcodeValueFile function or the printing preferences is used. The file can be a text file or a binary file if the selected barcode type supports it.

If BARCODE_PAGE_CONTENT (2) is specified, the content of the printed page is used as value for the generated barcode. A regular expression and format can be set using the SetBarcodeRegExpFile and SetBarcodeRegExpFormatFile functions or in the printing preferences, to filter the text. If the regular expression is not specified or not found, the whole page text is used. Please note, some applications might print part of the page content as images or vector graphics, even if it looks like text. In this case, the printer driver will be unable to extract the text of the page. In some cases glyph indexes might be used to print the text instead of ASCII or UNICODE text, in this case the output might contain garbled characters instead if readable text

Return value

TRUE on success, FALSE otherwise.