EndPage en TPrinter

EndPage en TPrinter

Postby fgondi » Mon Mar 27, 2006 8:47 am

Hola foro,

He encontrado el siguiente problema en la clase TPrinter.

El método EndPage contiene lo siguiente:
Code: Select all  Expand view
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
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby Antonio Linares » Mon Mar 27, 2006 9:26 am

Fernando,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41476
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fgondi » 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
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby fgondi » Mon Apr 03, 2006 9:01 am

Hola,

Sigo a vueltas con el error y no consigo localizarlo

Alguno sabe porque se produce este error?

Code: Select all  Expand view
   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
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby Antonio Linares » Mon Apr 03, 2006 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41476
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby fgondi » 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
User avatar
fgondi
 
Posts: 694
Joined: Fri Oct 07, 2005 6:58 am
Location: Palencia, España

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41476
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests