locked
How to adapt dpi in iWebbrowser or CHtmlView? RRS feed

  • Question

  • Our application is marked as DPI aware , there is a dialog,embedded a web browser control (CHtmlView), for showing url.

    but it show unnormal in high dpi mode or in 4k device.

    reference :

    http://stackoverflow.com/questions/15781260/what-does-the-zoom-factor-mean-in-olecmdid-optical-zoom

    it mentioned there is a flag DOCHOSTUIFLAG_DPI_AWARE controlling the High DPI behaviour of the web control.

    DOCHOSTUIFLAG_DPI_AWARE
    Internet Explorer 8. Causes layout engine to calculate document pixels as 96 dpi. Normally, a document pixel is the same size as a screen pixel. This flag is equivalent to setting the FEATURE_96DPI_PIXEL feature control key on a per-host basis.

    it confuses me if the flag affect the webbrowser control behavior in ie 10 or ie11  by the bellow link reg

    https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)?redirectedfrom=MSDN

    or 

    Is there a better way to support high dpi in web browser(CHtmlView)??

    Tuesday, April 7, 2020 6:38 AM

Answers

All replies