CHtmlView that is compatible with UltraHD
CHtmlView that is compatible with UltraHD
CHtmlView is not compatible with UltraHD resolutions. It is not simply down to using the correct HTML/CSS to be UltraHD aware. The print preview mechanism fails and crops the page. Many months ago Microsoft acknowledged this as an issue and has not addressed it.
CHtmlView
My application heavily uses a CHtmlView element for displaying schedules and printing. Whilst my application is Windows based (Win32/x64) I am getting more and more users on Mac computers running Windows inside it and they all are always using UltraHD by default. As a result my application fails to function properly and the user has to reduce the resolution and adjust text scaling back to 100%.
CHtmlView
Has anyone else encountered this issue with using UltraHD with CHtmlView print preview and got it working?
CHtmlView
The related question is here:
How can I make this HTML / CSS file UltraHD / 4k friendly in a CHtmlView?
But I asked that ages ago and got nowhere so I am trying again.
Thank you.
Update
I provided this XSL script to the user to try with Ultra HD resolution in my program:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html" indent="yes" version="4.01"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<div style="width:100%; height:100%; border: thick solid #00FF00;">This is a test
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
So it uses the <meta http-equiv="X-UA-Compatible" content="IE=edge" /> code and it has made no difference. When he does a print preview:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

So the problem still remains. It seems to be something to do with the Print Preview mechanism of the CHtmlView control.
CHtmlView
FEATURE_BROWSER_EMULATION reference.
– zett42
Sep 3 at 16:06
@zett42 I have not ever used or known about this meta tag. My documents are XSL / XML transformations so I should be able to add this meta tag. So, are you suggesting that IE7 in itself will not cope with Ultra HD? I will have to get this tested by a user.
– Andrew Truckle
Sep 3 at 16:17
Wikipedia lists some new features of IE11 like WebGL which you could try to use. W3Schools lists CSS3 support for different browser versions. Interesting read: High DPI support in IE11
– zett42
Sep 4 at 9:45
@zett42 Updated question with results.
– Andrew Truckle
Sep 9 at 14:30
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Do you use the FEATURE_BROWSER_EMULATION Registry Key or the Compatibility Meta Tag to target a newer version of the browser control? By default, the browser control is in compatibility mode, which means it emulates a very old version (like IE 7!)
– zett42
Sep 3 at 16:01