⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 help.htm

📁 VC++开源条形码代码。自动生成条形码和打印功能
💻 HTM
字号:

<h2><font color="#008000">Barcode library</font></h2>
Library file presented is Barcode.h under Lib directory, which contains inline C++ code for
<ul>
  <li>Code39</li>
  <li>Code93</li>
  <li>CodeI2of5</li>
  <li>Code128A</li>
  <li>Code128B</li>
  <li>Code128C</li>
</ul>
The library file is targeted to Win32, so it can be used by both MFC and Win32
programs.&nbsp;<br>
All classes are almost the same from user's point of view, only 2 functions are
needed to be used.
<ol>
  <li>Encode...()</li>
  <li>Draw...(...)</li>
</ol>
For example, class for Code39 is Barcode39:
<blockquote>
Call default constructor first, then call following 2 functions:<br>
BOOL Encode39(const char*pszCodeIn);<br>
void Draw39(HDC hDC,int iX,int iY0,int iY1,const COLORREF clrBar,const COLORREF clrSpace,const int
iPenW);
</blockquote>
Parameters of above functions:
<blockquote>
  pszCodeIn: string to be encoded, i.e. &quot;1234567890&quot;<br>
  iX: start horizontal position to draw the barcode<br>
  iY0,iY1: start and end vertical positions to draw the barcode<br>
  clrBar, clrSpace: colors of bar and space<br>
  iPenW: width of pen to draw the barcode 
</blockquote>
<b>
Sample program:</b>
<blockquote>
  The sample is a dialog based MFC program.<br>
  Main dialog is in borderless style, when edit-box Move (refer to picture
  bellow) gets focus, user can
  use arrow keys of up, down, left and right to move main dialog.<br>
  This feature allows you to compare barcode drawn on main dialog with other
  barcode programs easily.<br>
  You also can use mouse to drag main dialog by clicking on it as clicking on
  caption of normal windows.<br>
  <br>
  Controls:
  <ul>
  <li>Buttons:<br>
    OnTop/OnNormal: set the program as top-most-window or not<br>
    Close: close the program<br>
    Help: display this html file<br>
    Print: print barcode
  <li>Others<br>
    Style: barcode styles or symbologies<br>
    Map: map-mode used<br>
    Move: move main dialog by arrow keys once it gets focus<br>
    Code: string to be encoded<br>
    X,Y,Height: for print positions, unit is in logic points.<br>
  </ul>
</blockquote>
<p><b>Disappoint:</b></p>
<blockquote>
  <p>This sample and library file are my test program for barcode, which doesn't
  include second part: dynamical bitmap of barcode generated from encoding.<br>
  As we know, there are three methods for printing:
  <ol>
  <li>By drawing&nbsp;<br>
    Such as LineTo()
  <li>By Bitmap<br>
    Such as BitBlt()
  <li>By fonts<br>
    Such as TextOut()
  </ol>
  <p>Barcode must be printed clearly with high qualities. The only way to print
  good barcode is by fonts.&nbsp;<br>
  If you try to use the code for commercial purposes, result is very
  disappointed because this program is not using fonts.<br>
  <br>
  </p>
</blockquote>
<p><b>References</b></p>
<ol>
  <li>Barcode serial articles by Mr. Neil Van Eps</li>
  <li>Articles by Mr. Lam Do Thanh</li>
</ol>
<p>&nbsp;</p>
<img src="dialog.gif">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -