IWebBrowser2 blocks IFileDialog

0

In our 32-bit Windows MFC application we use IWebBrowser2 to display HTML content. We also (because MFC does it for us and we're running on Windows 10) use the new IFileDialog COM interface to the common file open dialog.

When we have a web browser window visible in the application, the file dialog will not open, or will open once but never again unless you run the application down and back up again. What usually happens is that this MFC call:-

 HRESULT hr = (static_cast<IFileDialog*>(m_pIFileDialog))->Show(m_ofn.hwndOwner);

simply returns "0x800704c7 The operation was canceled by the user" without even displaying the dialog.

Closing the HTML view/window allows the IFileDialog to work as expected, so the two components seem to be interfering with each other in some way.

This is now happening with software we haven't changed for months, and it seems only to be restricted to Windows 10, but we can find nothing online that gives any clues about the cause.

David.

c++
windows
mfc
iwebbrowser2
asked on Stack Overflow Oct 27, 2017 by Westie • edited Oct 27, 2017 by Hans Passant

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0