The information in this article applies to:
SUMMARYThe Windows Foundation Classes for Java (WFC) HTMLControl class provides an easy way to include the powerful features of Internet Explorer within your Visual J++ Windows applications. However, there isn't always an easy way to access all of the features. For example, what do you do to get beyond the setURL(String url) method? This article shows how to get the most out of HTMLControl. MORE INFORMATIONNOTE: The classes in the com.ms.wfc.html.om.* WFC package
are unsupported and are subject to change. This article provides an alternative to generating, packaging, and distributing Java wrappers for the Shdocvw DLL. If you find that this package is missing or doesn't expose the Shdocvw methods that you need, try generating your own wrappers per the instructions in this article.
These methods (and others) are available directly from HTMLControl because it is derived from com.ms.wfc.html.om.shdocvw.WebBrowser.WebBrowser, which is the Java COM wrapper for Internet Explorer's browser COM object (package com.ms.wfc.html.om provides Java wrapper classes for the Dynamic HTML object model). To have your HTMLControl object display the user's default Internet Explorer homepage, simply include a statement similar to the following:
Unfortunately, the documentation for the WebBrowser control is lacking, and Visual Studio's IntelliSense doesn't cover it well either.For a complete list of methods available to you from the Internet Explorer browser control, you can do what the WFC developers did. You can generate your own Java COM wrapper for Internet Explorer using the Jactivex utility. From a command prompt type something similar to the following (folders may differ based on operating system and settings. The following would be a typical command-line):
The above command should generate dozens of java files and a couple of folders all within a folder named Shdocvw. The only file that you're interested in is "\Shdocvw\WebBrowser\WebBrowser.java," which is the file that contains the Java prototypes to the public methods of the Internet Explorer browser COM object.
NOTE: If you plan to use WFC's HTMLControl class, you don't need this file other than as a supplement to the MSDN Library. REMINDER: For those of you who are more COM savvy, HTMLControl has a method named getOcx( ) that returns the IUnknown interface for the underlying ActiveX (COM) control. REFERENCESFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java,
please see the following pages on the Microsoft Technical Support site: http://support.microsoft.com/support/visualj/ © Microsoft Corporation 1999, All Rights Reserved. Additional query words:
Keywords : kbSDKJava kbVJ600 kbWFC kbGrpJava kbDSupport |
Last Reviewed: November 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |