Page 1 of 1

Possible issue with TeecreateMetafile

Posted: Fri Jan 19, 2018 9:40 am
by 16581145
Hello,

I thing there maybe an issue with TeeCreateMetafile when display scaling is enabled. The attached metafile was created with screen resolution set to 3200x1800 and scaling 150%. Anyone else noticed that behavior? (TeeCreateBitmap works ok)

Regards

Re: Possible issue with TeecreateMetafile

Posted: Mon Jan 22, 2018 2:36 pm
by 16581145
Attached is the sample code I used to create the wmf and bmp. When setting the resolution to a high one and scaling is larger than 100% then the wmf is not exported correctly

Re: Possible issue with TeecreateMetafile

Posted: Tue Jan 23, 2018 9:38 am
by yeray
Hello,

This very same issue was discussed here, isn't it the same?

Re: Possible issue with TeecreateMetafile

Posted: Wed Jan 24, 2018 7:55 am
by 16581145
Hello Yeray,

Apparently yes, thank you for the information!

Regards

Re: Possible issue with TeecreateMetafile

Posted: Wed Jan 24, 2018 9:27 am
by 16581145
Ok, it looks like that I cannot make the app create the "correct" size metafile unless I have the Enable High-DPI checked in the Project->Option->Application section. I was looking for a solution for the metafile issue when the High-DPI is unchecked ... maybe there is a work around?

Regards

Re: Possible issue with TeecreateMetafile

Posted: Thu Jan 25, 2018 9:24 am
by yeray
Hello,
johnnix wrote:maybe there is a work around?
None that I know (other than using a custom manifest with "dpiAware" set to true)

Re: Possible issue with TeecreateMetafile

Posted: Thu Jan 25, 2018 3:41 pm
by 16581145
Hello Yeray,

There is a work around, you need to set the metafile MMWidth and MMHeight properties, I modified the TeeCreateMetafile to do so (resulting metafile looks great) but there is an issue on how to get the custom system scaling value (remember I need not to enable the dpi-aware feature).

Regards