Hi all,

I am having a problem with mozilla embedded within my application.

I can build it and use the LoadURL api from nsIWebNavigation to browse to a web page and it works wonderfully.

However when I try to do the following:

// convert our string to stream
nsCOMPtr<nsIStringInputStream> inputStream = do_CreateInstance("@mozilla.org/io/string-input-stream;1", &rv);

inputStream->SetData("<html><img src=\"logo.gif\">My test generated page</html>", -1);

// get document shell
nsCOMPtr<nsIDocShell> docShell(do_GetInterface(mWebBrowser));

docShell->SetAllowImages(true);

// finally, load the stream we made
rv = docShell->LoadStream(inputStream,
                             NULL,
                             NS_LITERAL_CSTRING("text/html"),
nsCAutoString(wxLocale::GetSystemEncodingName()),
                             NULL);

The text is displayed but the image is missing. Does anyone know how I can fix this? My initial thought is perhaps the image search path isnt correct?

Thanks,

Craig.
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to