oPrn:ImportWMF()

Post Reply
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

oPrn:ImportWMF()

Post by Davide »

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

Post by Antonio Linares »

Davide,

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

Code: Select all

   ::SetIsoTropicMode()
   ::SetWindowExt( GetDeviceCaps( ::hDC, HORZRES ),;
                   GetDeviceCaps( ::hDC, VERTRES ) )
   ::SetViewPortExt( GetDeviceCaps( ::hDC, HORZRES ),; 
                     GetDeviceCaps( ::hDC, VERTRES ) )
or

Code: Select all

   ::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: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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

Post by Davide »

Antonio,

Code: Select all

   ::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

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

Post by Antonio Linares »

Davide,

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

Antonio Linares
www.fivetechsoft.com
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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

Post by Antonio Linares »

thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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

Post by Antonio Linares »

Davide,

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

Antonio Linares
www.fivetechsoft.com
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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.
Post Reply