error with Metafile

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

error with Metafile

Post by Silvio »

why it let me show this message

"Could not find the enchaned metafile, please check your TEMP enviroment variable"

and the it make a gpf ???



Code: Select all


function GenChild()

   local oWndChild, oBar, oBmp

   DEFINE WINDOW oWndChild OF oWnd MDICHILD COLOR "N/W"   VSCROLL HSCROLL

   DEFINE BUTTONBAR oBar 3D SIZE 25, 25 OF oWndChild

   DEFINE BUTTON OF oBar ACTION PutLabel( oBmp ) TOOLTIP "Label"
   DEFINE BUTTON OF oBar ACTION PutBitmap( oBmp ) TOOLTIP "Bitmap"

   DEFINE BUTTON OF oBar ACTION PreView( oBmp ) TOOLTIP "Preview"



   oBmp:=TEnhMetaFile():New( 20, 40, 535, 784, "TEST", oWndChild,;
               CLR_WHITE, CLR_BLACK )


   ACTIVATE WINDOW oWndChild

   

return nil
Best Regards, Saludos

Falconi Silvio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Silvio,

Because the metafile file is not found

Code: Select all

      if file( ::cCaption )
         ::hMeta = GetEnhMetaFile( ::cCaption )
      elseif ! Empty( ::cCaption )
         Alert( "Could not find the enhanced Metafile," + CRLF + ;
                "please check your TEMP environment variable" )
      endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

and How I must make to not show it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Use the filename of an existing metafile file
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

and if I create an temp metafile How I must make it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Silvio,

Use CreateEnhMetaFile()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

I not found the parameters for it
Best Regards, Saludos

Falconi Silvio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply