error with Metafile

error with Metafile

Postby Silvio » Tue Nov 20, 2007 11:48 am

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  Expand view

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
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Tue Nov 20, 2007 12:29 pm

Silvio,

Because the metafile file is not found
Code: Select all  Expand view
      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
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Tue Nov 20, 2007 12:34 pm

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

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

Postby Antonio Linares » Tue Nov 20, 2007 12:40 pm

Use the filename of an existing metafile file
regards, saludos

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

Postby Silvio » Tue Nov 20, 2007 12:54 pm

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

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

Postby Antonio Linares » Tue Nov 20, 2007 2:07 pm

Silvio,

Use CreateEnhMetaFile()
regards, saludos

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

Postby Silvio » Wed Nov 21, 2007 12:14 am

I not found the parameters for it
Best Regards, Saludos

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

Postby Antonio Linares » Wed Nov 21, 2007 7:08 am

regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 94 guests