FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour EndPage en TPrinter
Posts: 694
Joined: Fri Oct 07, 2005 06:58 AM
EndPage en TPrinter
Posted: Mon Mar 27, 2006 08:47 AM
Hola foro,

He encontrado el siguiente problema en la clase TPrinter.

El método EndPage contiene lo siguiente:
METHOD _EndPage() CLASS TPrinter

   if ::hDC = 0
    return nil
   endif

   if ::lMeta
    if Len( ::aMeta ) == 0
       MsgAlert( "The temporal metafile could not be created",;
             "Printer object Error" )
    else
       #ifndef __CLIPPER__
        ::hDCOut := DeleteEnhMetaFile( CloseEnhMetaFile( ::hDCOut ) )
       #else
	      ::hDCOut := DeleteMetaFile( CloseMetaFile( ::hDCOut ) )
       #endif

       if ! File( Atail( ::aMeta ) )
        MsgAlert("Could not create temporary file: "+Atail(::aMeta)+CRLF+CRLF+;
             "Please check your free space on your hard drive "+CRLF+;
             "and the amount of files handles available." ,;
             "Print preview error" )
       endif
    endif
   else
    EndPage( ::hDC )   // Esta función no exite
   endif

return nil

En el aparece la llamada "EndPage( ::hDC )", la cual es una función que no existe.
Un saludo

Fernando González Diez

ALSIS Sistemas Informáticos
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
EndPage en TPrinter
Posted: Mon Mar 27, 2006 09:26 AM

Fernando,

La función EndPage() está en source\winapi\printdc.c

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 694
Joined: Fri Oct 07, 2005 06:58 AM
EndPage en TPrinter
Posted: Mon Mar 27, 2006 11:49 AM

Hola Antonio,

Perdón, tienes toda la razón.

Me esta dando un error, de vez en cuando, porque no existe endpage y no logro localizarlo.

Seguiré buscando donde tengo el problema.

Un saludo

Fernando González Diez

ALSIS Sistemas Informáticos
Posts: 694
Joined: Fri Oct 07, 2005 06:58 AM
EndPage en TPrinter
Posted: Mon Apr 03, 2006 09:01 AM
Hola,

Sigo a vueltas con el error y no consigo localizarlo

Alguno sabe porque se produce este error?

   Error BASE/1.004  Mensaje sin definir: ENDPAGE
   Argumentos: Llamadas al Stack
_______________________________________________________________________________
   Called from ENDPAGE(0)
   Called from PAGEEND(0)
   Called from TPRN:SETPRINT(1057)
   Called from TPRN:SETPRINT(1075)
   Called from TGBUSQ:REPORT(770)
   Called from (b)TGBUSQ:BUILDCONTROLS(449)
   Called from TBTNBMP:CLICK(0)
   Called from TBTNBMP:LBUTTONUP(0)
   Called from TWINDOW:HANDLEEVENT(0)
   Called from TBTNBMP:HANDLEEVENT(1349)
   Called from _FWH(3136)
   Called from WINRUN(0)
   Called from TMDIFRAME:ACTIVATE(882)
   Called from MAIN(62)


Gracias por vuestro tiempo
Un saludo

Fernando González Diez

ALSIS Sistemas Informáticos
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
EndPage en TPrinter
Posted: Mon Apr 03, 2006 09:10 AM

Fernando,

Estás usando un errorsys modificado. Por favor haz que muestre la clase del objeto que está recibiendo ese mensaje. Gracias.

O usa el errorsys de FWH, que te lo indicará, y luego cambia al tuyo.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 694
Joined: Fri Oct 07, 2005 06:58 AM
EndPage en TPrinter
Posted: Mon Apr 03, 2006 10:31 AM

Hola Antonio,

Ya he dado con el problema. Estaba llamando a ENDPAGE sin haber llamado antes a PAGE

Gracias por tu tiempo y perdona por hacertelo perder en una bobada.

Un saludo

Fernando González Diez

ALSIS Sistemas Informáticos
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
EndPage en TPrinter
Posted: Mon Apr 03, 2006 11:59 AM

Fernando,

mejor que sea una bobada que algo más dificil :)

todos nos equivocamos. Somos humanos...

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion