ERRCODE BCGetBarcodeSize ( t_BarCode pBarCode,
LPRECT  pRect,
HDC  hDC,
e_MUnit  eUnit,
DOUBLE *  pdWidth,
DOUBLE *  pdHeight 
)

Computes the barcode size (recommended method).

Computes width and height of barcode with one call. You can use this function before you draw the barcode to ensure that there is enough space available. Call this function after BCCreate() and specify a bounding rectangle (target coordinates, where you would draw the barcode). This rectangle is relevant if you haven't specified a module width or a row height. As for the bounding rectangle pass in the same coordinates as you would use for drawing. Some symbologies have a specific width/height ratio and therefore the bar code size is adapted to fit into the bounding rectangle.
hDC can be NULL. In this case the bounding rectangle must be specified in 1/1000 mm. The measurement units are:

  • eMUDefault ... logical units of the given device context.
  • eMUMM ... millimeters
  • eMUPixel ... pixels if device context is given, otherwise points (= 1/72 inch)
    See also:
    BCGetBarcodeHeight(), BCGetBarcodeWidth()
    Note:
    Windows only

    Call this function after BCCreate()

    Parameters:
    [in] pBarCode Pointer to barcode structure.
    [in] pRect Bounding rectangle.
    [in] hDC Device context handle.
    [in] eUnit Measurement unit.
    [in,out] pdWidth Pointer to resulting width (NULL if not required).
    [in,out] pdHeight Pointer to resulting height (NULL if not required).
    Return values:
    ERRCODE ErrOk (0) in case of success. Non-zero if error occurred.


© 2008 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Tue May 5 15:50:33 2009 for TEC-IT TBarCode Library 9.2 with doxygen 1.5.3