您的位置->>速创科技->>在线支持                                  

编号:2138 留言者名称:wenchao 标题:这个函数说明在那找呢?
B_Prn_Barcode()  谢谢
地区:其它    留言时间: 2003-8-6 16:20:47
专家解答:
B_Prn_Barcode()
    ==============================================================================
        PURPOSE  Create a "barcode" object and a "counter" object.

         SYNTAX  int B_Prn_Barcode(int x,int y,int ori,char type[4],int narrow,
                              int width,int height, char human,LPCTSTR data);

      PARAMETER  int     x;               X coordinate in dots.
                 int     y;               Y coordinate in dots.
                 int     ori;             Orientation or print direction.
                                           Value: 0, 1, 2, 3.
                 char    type[4];         Bar code type as follows:
        +========================================================================+
        | type|          Bar Code           | type|           Bar Code           |
        +========================================================================+
        |  0  | Code 128 UCC (shipping cont-|  E30| EAN-13                       |
        |     | ainer code)                 +-----+------------------------------+
        +-----+-----------------------------+  E32| EAN-13 2 digit add-on        |
        |  1  | Code 128 subset A,B and C   +-----+------------------------------+
        +-----+-----------------------------+  E35| EAN-13 5 digit add-on        |
        |  1E | UCC/EAN                     +-----+------------------------------+
        +-----+-----------------------------+  E80| EAN-8                        |
        |  2  | Interleaved 2 of 5          +-----+------------------------------+
        +-----+-----------------------------+  E82| EAN-8 2 digit add-on         |
        |  2C | Interleaved 2 of 5 with che-+-----+------------------------------+
        |     | ck sum digit                |  E85| EAN-8 5 digit add-on         |
        +-----+-----------------------------+-----+------------------------------+
        |  2D | Interleaved 2 of 5 with hum-|  K  | Codabar                      |
        |     | an readable check digit     +-----+------------------------------+
        +-----+-----------------------------+  P  | Postnet                      |
        |  2G | German Postcode             +-----+------------------------------+
        +-----+-----------------------------+  UA0| UPC-A                        |
        |  2M | Matrix 2 of 5               +-----+------------------------------+
        +-----+-----------------------------+  UA2| UPC-A 2 digit add-on         |
        |  2U | UPC Interleaved 2 of 5 (应输入13位)     +-----+------------------------------+
        +-----+-----------------------------+  UA5| UPC-A 5 digit add-on         |
        |  3  | Code 3 of 9                 +-----+------------------------------+
        +-----+-----------------------------+  UE0| UPC-E                        |
        |  3C | Code 3 of 9 with check sum  +-----+------------------------------+
        |     | digit                       |  UE2| UPC-E 2 digit add-on         |
        +-----+-----------------------------+-----+------------------------------+
        |  9  | Code 93                     |  UE5| UPC-E 5 digit add-on         |
        +-----+-----------------------------+-----+------------------------------+
                 int     narrow;          Narrow bar width in pixels.
                 int     width(无效参数);           Wide bar width in pixels.
                 int     height;          Bar code height in pixels.
                 char    human;           N -no text is printed or B - the human
                                           readable text is printed.
                 LPCTSTR data;            A text string. When the data is added the
                                           format for <Operation Number> is added
                                           counter. Operation: "+" or "-" sign,
                                                    Number: 0 ~ 32768 number.
         RETURN  0    -> OK.
                 Reference BW-Error.txt file.

        EXAMPLE  B_Prn_Barcode(650,15,0,"E80",2,2,51,'B',"1234567"); // no counter
                 or
                 B_Prn_Barcode(650,15,0,"E80",2,2,51,'B',"1234567<+10>");//have a counter

条码小知识:
  直到1970年Iterface Mechanisms公司开发出“二维码”之后,才有了价格适于销售的二维矩阵条码的打印和识读设备。那时二维矩阵条码用于报社排版过程的自动化。二维矩阵条码印在纸带上,由今天的一维CCD扫描器扫描识读。CCD发出的光照在纸带上,每个光电池对准纸带的不同区域。每个光电池根据纸带上印刷条码与否输出不同的图案,组合产生一个高密度信息图案。用这种方法可在相同大小的空间打印上一个单一的字符,作为早期Kermode码之中的一个单一的条。定时信息也包括在内,所以整个过程是合理的。当第一个系统进入市场后,包括打印和识读设备在内的全套设备大约要5000美元。