I have made a report using the TPRINTER class with PREVIEW.
Just before the preview is shown, the following error is dsplayes :
Error (6) deleting enhanced metafile
Error description
I put MsgInfo() in the PRINTER.PRG and I found out that the error occurs in the next procedure :
- Code: Select all Expand view RUN
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__
* In the next line, the error occurs !!!
DeleteEnhMetaFile( CloseEnhMetaFile( ::hDCOut ) )
#ELSE
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 )
endif
return nil
Does anyone know what the reason is for this problem ?
Thanks.