I just don t’ know if this would works for you, but you would at least get the syntax and the idea to go through it, here is what I have made from my last graduation project
Code:
nsresult pqr;
nsCOMPtr<nsIBaseWindow> baseWindow;
nsCOMPtr<nsIWebBrowser> webBrowser;
Create a new Web Browser ……
webBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID, &pqr);
if (NS_FAILED(pqr)) return pqr;
Give the WebBrowser a pointer to the embedding component which
implements the callback interfaces. Replace 'this' with
an suitable entity...
pqr = webBrowser->SetContainerWindow((nsIWebBrowserChrome*)this);
if (NS_FAILED(pqr)) return pqr;
baseWindow = do_QueryInterface(web Browser);
Initialize the Web Browser with a subject parent window
(ie. HWND on Win32). Replace 'nativeWindow' with a
reference to an appropriate native resource...
pqr = baseWindow->InitWindow(nativeWindow, // Native window
nsnull, // Always nsnull.
x, y, cx, cy); // Initial dimensions...
if (NS_FAILED(pqr)) return pqr;
construct the a new window for the Web Browser.
pqr = baseWindow->Create();
if (NS_FAILED(pqr)) return pqr;
Bookmarks