2

Open the HTML dialog from the HTA application using showModelessDialog/showModalDialog. The HTA application is running in mode ie11 (tag <meta http-equiv="x-ua-compatible" content="ie=11">), but the dialog opened always runs in mode ie8. The tag <meta http-equiv="x-ua-compatible" content="ie=11"> in the opened document does not work. How to open a document using showModelessDialog/showModalDialog in the mode ie11? This is needed for svg or WebGL in the dialog.

Main.hta:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
    <head>
        <meta http-equiv="x-ua-compatible" content="ie=11">
    </head>

    <body>
        <a href="#" onclick="showModelessDialog ('Dialog.hta'); return false;">Open Dialog</a>  
    </body>
    <script>
        alert (navigator.userAgent);
    </script>
</html>

Dialog.hta

<html>
    <head>
        <meta http-equiv="x-ua-compatible" content="ie=11">   
    </head>
    <body>
        <script>
            alert (navigator.userAgent);
        </script>
    </body>
</html>
Donald Duck
  • 6,488
  • 18
  • 59
  • 79
  • 1
    iirc, since showModalDialog was deprecated before IE10, they froze it's mode as IE8. – dandavis Nov 20 '17 at 20:29
  • @dandavis Modal dialogs work on HTML pages very well in IE9, IE10 and IE11 standards mode, they were "frozen" in htas only. I've [asked](https://stackoverflow.com/q/11727815/1169519) about this a couple of years ago ... – Teemu Nov 21 '17 at 05:01
  • I tried to use IHostDialogHelper->ShowHTMLDialog result in the same - maximally ie8. Meta and FEATURE_BROWSER_EMULATION did not solve the problem. – Eugene Abramov Nov 27 '17 at 04:44
  • It can't be solved, Microsoft has dropped support for HTAs for years ago. Diaologs were not updated for IE9 anymore, and there's no way to get a support for modern standards of dialogs. The only way is either to use regular windows as dialogs, or you can implement your own dialog system using iframes and/or separate HTA files. A third option is to emulate dialogs with divs like modern web apps are doing. – Teemu Nov 27 '17 at 14:50
  • Well thank you. Very sorry. A good opportunity to create simple multi-windows applications. – Eugene Abramov Nov 28 '17 at 10:39

1 Answers1

0

The problem was solved by creating a COM object with two functions SetObject and GetObject. The object is sent using the WM_GETOBJECT message as specified here.