I just want to successfully add it to my window, and it has been surprisingly difficult.
I've tried
#include "windef.h"
#include "winbase.h"
#include "initguid.h"
#include "ole2.h"
#include "olectl.h"
#include "shobjidl.h"
#include "shlguid.h"
#include "exdispid.h"
#include <objidl.h>
#include "OleIdl.h"
#include "Objbase.h"
#include <exdisp.h>
#include <exdispid.h>
...
IWebBrowser2* pBrowser2;
HRESULT hr = CoCreateInstance(CLSID_InternetExplorer, NULL,
CLSCTX_ALL, IID_IWebBrowser2, (void**)&pBrowser2);
Getting
error: 'CLSID_InternetExplorer' undeclared (first use in this function)
HRESULT hr = CoCreateInstance(CLSID_InternetExplorer,
I've also tried
CoCreateInstance(CLSID_WebBrowser, NULL, CLSCTX_LOCAL_SERVER,
IID_IWebBrowser2, (void**)&pBrowser2);
This one at least compiles, but nothing is added to the window:
hr = OleCreate(&CLSID_WebBrowser, &IID_IOleObject, 1/*OLERENDER_DRAW*/, 0,
&ClientSite, &Storage, (void**)&mpWebObject);
I tried all headers and libraries I could find on the net (as you can see).
Here are the libraries I link:
gcc -lmingw32 -mwindows -luser32 -lgdiplus -lole32 -luuid -loleaut32 -lcomctl32 -lcomdlg32 -ladvapi32 -loleaut32 -lshdocvw -lmf -lmfuuid
Thanks!