1

I have Windows 7, and Internet Explorer 8, Visual Studio 2008. I need to create Active X window which will show page from other site. I try to create CAxWindow window while IE in Protected Mode. It returns Access Denied error (5) if current site isn't trusted.

Class of new window defined as:

class CNewWnd: public CWindowImpl<CNewWnd, CAxWindow, CWinTraits<WS_CHILD | WS_BORDER, WS_EX_TOOLWINDOW>>

Create new window implemented as:

hWndContainer = Create(hParent, r);

where hParent is HWND of browser. As result hWndContainer = NULL and GetLastError() returns 5.

MSDN's article "Understanding and Working in Protected Mode Internet Explorer" describes only working with System Registry, Files and Processes - none of word about windows creating.

Rett Pop
  • 9
  • 3
  • I don't get it, do you want some other error code? What part of "untrusted" is fuzzy? – Hans Passant Nov 08 '10 at 15:23
  • No. I want that window was created. With Protected Mode turned off Create(hParent, ...) returns HWND for created window. And GetLastError() returns 0. When the AxWindow window created while some site from Trusted Sites (Service/Internet Options/Security) is open, it's all OK. But if I try to do it on any other site - Access Denied error is occur. – Rett Pop Nov 08 '10 at 15:45

0 Answers0