Select the product you need help with
How to get IHTMLDocument2 from a HWNDArticle ID: 249232 - View products that this article applies to. This article was previously published under Q249232 Summary
This article shows how to get the IHTMLDocument2 interface from a HWND. If Microsoft Active Accessibility (MSAA) is installed, you can send the WM_HTML_GETOBJECT message to the document's window (with the window class "Internet Explorer_Server") and then pass the result from SendMessage to an MSAA function, ObjectFromLresult, to get a fully marshaled IHTMLDocument2 pointer.
More information
You must have Active Accessibility components installed on the system for the code described in this section to work. Client developers can use the SDK to develop and update Active Accessibility aids. If you incorporate the latest version of Active Accessibility and distribute new versions of your accessibility aids, you must distribute the runtime components (RDK) for clients that have been developed for Microsoft Windows 95, Windows 98, or Windows NT 4.0 with Service Pack 4 or 5. It's not necessary to include the RDK for clients developed solely for Windows 2000, or for Windows NT 4.0 with Service Pack 6. The new components are already included in these operating systems.
See the "References" section of this article for information about Active Accessibility and where to download the Active Accessibility SDK. References
The SDK for developers and the RDK, which installs the Active Accessibility runtime components onto the operating system, can be downloaded from the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b14f6e1-888a-4f1d-b1a1-da08ee4077df&DisplayLang=en
For information about the Microsoft Active Accessibility support provided by the MSHTML component of Microsoft Internet Explorer, visit the following Web site:
(http://www.microsoft.com/downloads/details.aspx?FamilyID=9b14f6e1-888a-4f1d-b1a1-da08ee4077df&DisplayLang=en)
About Active Accessibility Support
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://msdn.microsoft.com/en-us/subscriptions/ms528415(v=vs.85).aspx)
176792
(http://support.microsoft.com/kb/176792/
)
How to connect to a running instance of Internet Explorer
PropertiesArticle ID: 249232 - Last Review: August 2, 2012 - Revision: 4.0
| Article Translations
|



Back to the top








