-
August 11th, 2013, 06:29 AM
#1
create webbrowser with ATL
Hi,
I'm trying to create a simple webbrowser at my app.
code sample:
....
ATL::CAxWindow m_wndContainer;
ATL::CComPtr<IWebBrowser2> m_spWebBrowser;
HWND hWnd = m_wndContainer.Create(NULL,
CRect(0,0,200,100),
(LPCTSTR)0,
WS_CAPTION|WS_THICKFRAME|WS_OVERLAPPED|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
CoCreateInstance(CLSID_WebBrowser,NULL,CLSCTX_INPROC,IID_IWebBrowser2,(void**) &m_spWebBrowser);
...
everything is work fine except the fact the it seems that it create an IE version 7.0 and my machine have IE 8 installed.
it not suppose to create the IE according to my installed version?
how do i suppose to do it?
thanx anyone
-
August 13th, 2013, 12:16 PM
#2
Re: create webbrowser with ATL
Under the following registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
add a DWORD value having the name of your application that hosts the Web Browser Control.
Set the value as stated in MSDN Library: Internet Feature Controls - Browser Emulation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|