-
May 19th, 2013, 05:56 AM
#1
JSON undefined in my webbrowser container
Hi all,
I create an IWebBrowser2* object and attached it to new window.
I create also a simple html page containing JScript alert(JSON) command.
when i load the page from IE the page works fine.
but when i load the page from my object i get JSON undefined.
do i nead to set my object with some setting?
-
May 19th, 2013, 08:57 AM
#2
Re: JSON undefined in my webbrowser container
My code:
...
ATL::CComPtr<IWebBrowser2> m_spWebBrowser;
ATL::CAxWindow m_wndContainer;
HWND hWnd = m_wndContainer.Create(NULL,
CRect(0,0,1200,600),
(LPCTSTR)0,
WS_CAPTION|WS_THICKFRAME|WS_OVERLAPPED|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
if (NULL == hWnd) {
return false;
}
if (FAILED(m_spWebBrowser.CoCreateInstance(__uuidof(WebBrowser), NULL))) {
m_wndContainer.DestroyWindow();
return false;
}
// associate webbrowser control with container window
if (FAILED(m_wndContainer.AttachControl((IUnknown*)m_spWebBrowser, NULL))) {
m_spWebBrowser = NULL;
m_wndContainer.DestroyWindow();
return false;
}
....
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
|