Hi all, I have been trying over the last few weeks with little success to integrate Webkit into a VC2005 project that uses Windows.Forms for its GUI. I have successfully built the WinLauncher application that comes with the WebKit package, but that project relies heavily on its integration with the WebKit Solution. After some work I was able to build a version of WinLauncher outside the WebKit solution, but cannot find a solution that will allow me to integrate into a Windows.Forms .h file. Since the VC2005 GUI designer creates it forms in .h files.
I am writing my app in C++/CLI mode (not C#). Brief description: I am trying to display the WebView in a Panel (contentPanel) on my Form: IntPtr ptrHwnd = contentPanel->Handle; HWND newHwnd = (HWND)ptrHwnd.ToPointer(); pin_ptr<IWebView*> p = &gWebView; HRESULT hr = CoCreateInstance(CLSID_WebView, 0, CLSCTX_ALL, IID_IWebView, (void**)p); if (FAILED(hr)) goto exit; gWebHost = new CPortalBrowserWebHost(); gWebHost->AddRef(); hr = gWebView->setFrameLoadDelegate(gWebHost); if (FAILED(hr)) goto exit; hr = gWebView->setHostWindow((OLE_HANDLE) ptrHwnd.ToPointer()); if (FAILED(hr)) goto exit; RECT clientRect; GetClientRect(newHwnd, &clientRect); hr = gWebView->initWithFrame(clientRect, 0, 0); if (FAILED(hr)) goto exit; It fails on the hr = gWebView->initWithFrame(clientRect, 0, 0); with an error code of (-2147024882). If anyone can help with this issue I would greatly appreciate it!
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev