Question

I'm using Embarcadero RAD Studio XE5 C++. Why there is no "Document" after WebBrowser1->OleObject-> ?? Besides that I have another problem:

#include <mshtml.h>
...
HtmlDocument doc;

Error:

[bcc32 Error] Unit1.cpp(16): E2451 Undefined symbol 'HtmlDocument'
Was it helpful?

Solution

Having never used this particular VCL style wrapper, I have done some searching on the Embarcadero Developer Network (EDN). This article by Tim DelChiaro may be helpful: iOS Web Browser with C++Builder XE5. Sample source code is available after navigating a couple clicks. This sample code is on Source Forge at: RAD Studio Demo Code - MobileCodeSnippets - CPP - WebBrowser

Within my RAD Studio help, on the TWebBrowser component it says:

Note: Because TWebBrowser wraps the SHDOCVW.DLL, you must have SHDOCVW.DLL installed to use this component. This DLL ships with Internet Explorer 4 and later.

Note that the above article describes using the component for iOS. So there is likely something special to be aware of within the sample project. There is also this 2001 EDN article by Vino Rodrigues, which may not be as helpful due to age and being Delphi centric, at: Using The WebBrowser Component.

There are other EDN articles that turn up on a search using twebbrowser within the EDN site. Two pages worth of stuff appear. There is a pretty decent chance that using a locally declared HtmlDocument instance is not necessary. I hope this information helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top