horacio wrote:Gracias Daniel por contestar. Uso xHarbour build 1.1.0 Intl. (Simplex)
Daniel Garcia-Gil wrote:Saludos
...los codebar que usa la ZEBRA, EAN13, EAN8, UPCA, UPCE, CODE39, ITF, MSI, CODABAR, CODE93, CODE11, CODE128, PDF417, DATAMATRIX
function BuildCode( nCode, cCode, nFlags )
LOCAL hDC1 := ovent:GetDC( )
LOCAL hDC := CreateCompatibleDC( hDC1 )
LOCAL hDib
LOCAL hBmp := CreateCompatibleBitmap( hDC1, 150, 50 )
LOCAL hOldBmp := SelectObject( hDC, hBmp )
default nFlags := 0
oCode:Reset()
if nCode < CODEBAR_PDF417
oCode:nHeightCode = oCode:nHeight - 50
oCode:nWidthCode = 1.5
else
oCode:nHeightCode = 3
oCode:nWidthCode = 1
endif
oCode:SetType( nCode )
oCode:SetCode( cCode )
oCode:SetFlags( nFlags )
oCode:Build()
DrawBitmap( hDC, oCode:hCodeBar, 0, 0 )
hDib := DibFromBitmap( hBmp )
DibWrite( "file.bmp" , hDib )
GloBalFree( hDib )
ovent:ReleaseDC()
return nil
DrawBitmap( hDC, oCode:hCodeBar, 0, 0 )
SelectObject( hDC, hOldBmp )
hDib := DibFromBitmap( hBmp )
DibWrite( "file.bmp" , hDib )
GloBalFree( hDib )
DeleteObject( hBmp )
DeleteDC( hDC )
ovent:ReleaseDC()
function BuildCode( nCode, cCode, nFlags )
local hDC := oWnd:GetDC()
LOCAL hDC1 := CreateCompatibleDC( hDC1 )
LOCAL hDib
LOCAL hBmp := CreateCompatibleBitmap( hDC, 150, 50 )
LOCAL hOldBmp := SelectObject( hDC1, hBmp )
default nFlags := 0
oCode:Reset()
if nCode < CODEBAR_PDF417
oCode:nHeightCode = oCode:nHeight - 50
oCode:nWidthCode = 1.5
else
oCode:nHeightCode = 3
oCode:nWidthCode = 1
endif
oCode:SetType( nCode )
oCode:SetCode( cCode )
oCode:SetFlags( nFlags )
oCode:Build()
DrawBitmap( hDC, oCode:hCodeBar, 0, 0 )
selectObject( hdc,hOldbmp )
hDib := DibFromBitmap( hBmp )
DibWrite( "file.bmp" , hDib )
GloBalFree( hDib )
DeleteObject( hbmp )
DeleteDc ( hDC )
oWnd:ReleaseDC()
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 59 guests