Buenas noches,
Una ayuda por favor.
Ell primer dibujo del c贸digo pdf417, se hace bien, cuando necesito generar el siguiente c贸digo, lo sobrescribe encima del anterior.
驴Qu茅 me hace falta?
Muchas gracias por una ayuda.
Una ayuda por favor.
Ell primer dibujo del c贸digo pdf417, se hace bien, cuando necesito generar el siguiente c贸digo, lo sobrescribe encima del anterior.
驴Qu茅 me hace falta?
# include "fivewin.ch"
Static oWnd, oImg_pdf417
Function MAIN ()
Local nAncho_CW := 002, onAncho_CW ,;
nAlto_CW := 004, onAlto_CW ,;
nYi := 410 ,;
nXi := 020 ,;
nxAncho := 600 ,;
nyAlto := 250 ,;
sTipo_CB := "PDF417"
Local oFont_WD_16
Local sFile := cGetFile32 ( "Buscar textos para pdf417 *.txt | *.txt |", "Buscar otro archivo txt con los textos para el c贸digo pdf417", 0, hb_CurDrive () + ":\" + CurDir(), .F., , )
Local sTexto := MEMOREAD ( IIF ( LEN ( ALLTRIM ( sFile ) ) = 0, ".\z_qrcode.txt", sFile ) )
DEFINE FONT oFont_WD_16 NAME "TIMES NEW ROMAN" SIZE 0, -16
DEFINE ICON oIco FILENAME ".\zz_qrcode.ico"
DEFINE WINDOW oWnd FROM 000, 000 TO 660, 650 PIXEL ICON oIco ; && Alto * Ancho
TITLE "hb_zebra_create_pdf417"
@ 167, 445 BUTTON oBtn_Otro PROMPT "Leer otro archivo *.txt" SIZE 186, 30 PIXEL FONT oFont_WD_16 OF oWnd ;
MESSAGE "Buscar y leer otras l铆neas de texto" ;
ACTION ( sFile := cGetFile32 ( "Buscar textos para pdf417 *.txt | *.txt |", "Buscar otro archivo txt con los textos para el c贸digo pdf417", 0, hb_CurDrive () + ":\" + CurDir(), .F., , ) ,; && .F. = Abrir ) ,;
sTexto := MEMOREAD ( IIF ( LEN ( ALLTRIM ( sFile ) ) = 0, ".\z_qrcode.txt", sFile ) ) ,;
sFile_PDF417 := Dibujar_PDF417 ( oWnd:GetDC(), sTexto, nYi, nXi, nAncho_CW, nAlto_CW, CLR_BLUE ) )
oBtn_Otro:cTooltip := { "Leer 0tro archivo para generar nuevo c贸digo pdf417", "Siguiente archivo *.txt", 1, CLR_WHITE, CLR_HRED }
ACTIVATE WINDOW oWnd ;
ON PAINT ( Dibujar_pdf417 ( hDC, sTexto, nYi, nXi, nAncho_CW, nAlto_CW ) )
Return ( NIL )
* -------------------------------------------------------------------------------------------------------------- *
* -------------------------------------------------------------------------------------------------------------- *
Function Dibujar_pdf417 ( hDC, sTexto, nYi, nXi, nAncho_CW, nAlto_CW, nColor )
Local hZebra
Local hBrush := CreateSolidBrush ( 0 )
*? hdc
hZebra := HB_ZEBRA_CREATE_PDF417 ( sTexto, NIL )
oImg_pdf417 := HB_ZEBRA_DRAW ( hZebra , { | x, y, w, h | FILLRECT ( hDC , { y, x, y + h, x + w }, hBrush ) }, nXi, nYi, nAncho_CW, nAlto_CW )
deleteobject ( hBrush )
hb_zebra_destroy ( hZebra )
Return ( oImg_pdf417 )
* -------------------------------------------------------------------------------------------------------------- *Muchas gracias por una ayuda.
J. Ernesto Pinto Q.
Fwh_x64 2501, BCC++_x64 7_70 , Harbour 3.20, LopeEdit 5.8
jepsys@hotmail.com, jepsys@gmail.com