oPrn:ImportWMF()

oPrn:ImportWMF()

Postby Davide » Sun Apr 02, 2006 4:22 pm

Antonio,

after the last modification to ImportWMF() introduced with the March build, the function works ok in XP, either with WMF or with EMF files, but in Windows 98 both the file types are loaded incorrectly.

Please have a look at the modified corel.prg sample I've sent to your private mailbox.

Thank you,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Sun Apr 02, 2006 6:57 pm

Davide,

In Class TPrinter Method ImportWMF() try these two possibilities:

Code: Select all  Expand view  RUN
   ::SetIsoTropicMode()
   ::SetWindowExt( GetDeviceCaps( ::hDC, HORZRES ),;
                   GetDeviceCaps( ::hDC, VERTRES ) )
   ::SetViewPortExt( GetDeviceCaps( ::hDC, HORZRES ),;
                     GetDeviceCaps( ::hDC, VERTRES ) )

or
Code: Select all  Expand view  RUN
   ::SetIsoTropicMode()
   ::SetWindowExt( aData[ 1 ], aData[ 2 ] )
   ::SetViewPortExt( aData[ 1 ], aData[ 2 ] )
regards, saludos

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

Postby Antonio Linares » Sun Apr 02, 2006 7:02 pm

Davide,

In XP if you double click on the EMF file, the XP graphics viewer reports that there is an error on the EMF file. Paint Shop Pro also refuses to open it.
regards, saludos

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

Postby Davide » Sun Apr 02, 2006 8:44 pm

Antonio,
In XP if you double click on the EMF file, the XP graphics viewer reports that there is an error on the EMF file. Paint Shop Pro also refuses to open it.

I've seen it. I've created the EMF with OpenOffice, starting from the WMF one. In W98 they are both opened correctly with ACDSee.
Anyway, I'm particularly worried about the WMF, for backward compatibility. I'll try your suggestions and I'll let you know.

Thanks,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Davide » Sun Apr 02, 2006 9:43 pm

Antonio,
Code: Select all  Expand view  RUN
   ::SetIsoTropicMode()
   ::SetWindowExt( GetDeviceCaps( ::hDC, HORZRES ),;
                   GetDeviceCaps( ::hDC, VERTRES ) )
   ::SetViewPortExt( GetDeviceCaps( ::hDC, HORZRES ),;
                     GetDeviceCaps( ::hDC, VERTRES ) )

Same behaviour. Anyway, it doesn't seem related to the size of printer object because the image itself is "mixed", as you can see in the screenshot I've sent you.
Code: Select all  Expand view  RUN
   ::SetIsoTropicMode()
   ::SetWindowExt( aData[ 1 ], aData[ 2 ] )
   ::SetViewPortExt( aData[ 1 ], aData[ 2 ] )

It's already implemented this way, anyway I recompiled and relinked printer.prg, but nothing changes.

It seems that I've found a strange image however, because I tried other old WMF's and they works ok in Windows98 too.
The funny thing is that this image is working ok with XP and always worked well with previous FWH and FW versions in 98 too.

Thank you,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Sun Apr 02, 2006 10:12 pm

Davide,

You may try to rebuild that file again to see if it gets fixed.
regards, saludos

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

Postby Davide » Mon Apr 03, 2006 11:15 am

Antonio,
Antonio Linares wrote:You may try to rebuild that file again to see if it gets fixed.

I tried the WMF on another W98 machine. Same behaviour.
I reopened the WMF with CorelDraw (which displays it correctly) and reexported it as a WMF file. Same behaviour.
The original WMF worked well in past, and it works ok in XP even now, with FWH27-3, so I guess it may be related to the changes made in FWH to use EMF files instead of WMF. I'm going to make a test with FWH25 anyway. I'll let you know.

Thank you,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Mon Apr 03, 2006 11:54 am

thanks,
regards, saludos

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

Postby Davide » Mon Apr 03, 2006 12:08 pm

Antonio,

I confirm you the original WMF works ok with FWH25 in Windows98.
The problem may be related to the WMF2EMF() function in 98.

Hi,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Mon Apr 03, 2006 12:09 pm

Davide,

We just use standard Win32 functions for WMF2EMF().
regards, saludos

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

Postby Davide » Mon Apr 03, 2006 2:47 pm

Antonio,
Antonio Linares wrote:We just use standard Win32 functions for WMF2EMF().

well, I really don't know why it worked before and it does not work well now. It was only a guess/suggestion based on the tests I've made so far.

Thank you,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 47 guests