|Frequently Asked Questions|
The Webster Pro Control does not utilize DLLs from any other browser, which is why it has such a small footprint and is so easy to redistribute. It is layered directly over Winsock and does not require WININET.DLL.
Scripting, Java applets, Plug-ins and ActiveX embedding are not supported in the Webster Pro and such support is not planned for this product. This is in order to keep the OCX footprint light and the redistribution requirements to a minimum.
The D-Type control is smaller because it relies on the MFC support DLLs MFC42.DLL and MSVCRT.DLL, so it saves space if your application already has other dependencies on the MFC support DLLs.
The S-Type control is about 25% larger but it does not require the MFC support DLLs, so it is easiest to redistribute and saves space if your application has no dependencies on the MFC support DLLs. More....
You can create a new page or replace the content of an existing page (the visible page or any cached page) by using the Navigate method with the NavCreateFromText bit set in the NavFlags argument. For example:
Dim rawHtml As String REM Create the string for direct input: rawHtml = "<HTML><BODY BGCOLOR=white><CENTER><H2>Sample direct input.</H2></CENTER></BODY></HTML>" REM Create a new page from the input string: Navigate "http://my.dummy.com/dummy.htm", NavGet + NavCreateFromText, 0, "", rawHtml, ""Specify a well-formed dummy URL when creating a new page. You can also replace the entire content of any existing page, regardless of the original source.
Using the Sagan (32-bit S-Type), Darwin (32-bit D-Type) or Vogon Poetry (16-bit) demo applications installed with the control (source available at the Samples page), you can exercise this feature by selecting the menu item "Edit | Paste Special...". Direct1 is a VB sample which demonstrates direct HTML input from a string.
The easy way to print is via the DoPrint method, which allows you to select the printed page range and can optionally display a Print dialog.
For additional flexibility and control over printing you can use the Paginate2, PrintToDC and EndPrint methods. The VB sample Printer1 shows how to use these methods to add custom headers and footers when printing. For VC++ samples see the source code for Sagan (32-bit S-Type), Darwin (32-bit D-Type) or Vogon Poetry (16-bit).
The PrintBackgroundColors property determines whether Table cell and page background colors are printed.
The PrintPageBreakForTables and PrintPageBreakForImages properties determine how tables and images are broken or preserved across printed page boundaries.
The PrintHeader and PrintFooter properties select the default printed page header and footer.
You can hide or show the whole toolbar by setting the TitleWindowStyle property to BarNone (= 0), or you can hide or show each individual toolbar button via the ButtonMask property. For example, to hide the Print button use:
WebsterPro1.ButtonMask = WebsterPro1.ButtonMask And Not PrintButtonMaskMask
To show the Print button again, use:
WebsterPro1.ButtonMask = WebsterPro1.ButtonMask Or PrintButtonMaskMask
Each of the toolbar buttons has a corresponding method. Going from left to right on the toolbar, they are:
ShowOpenFileDialog ShowURLDialog CopySelectedText DoPrint SaveToDisk GoHome PageBack PageForth ShowFavoritesDialog AddToFavorites Cancel and Reload FindString ShowStatus ShowHistory
The rightmost ("movie") button functions just like the Reload/Cancel button.
To maintain the enabled state of your UI, you can read the logical enabled state of each button (even if hidden) from the ButtonEnabledMask property. For example, to check if the PageBack button is enabled use:
PageBackEnable = (WebsterPro1.ButtonEnabledMask And BackButtonMask) <> 0
Control registration failures during setup of your application are almost invariably the result of a problem with support DLLs. Typically, you will get a message similar to:
"The control cannot be registered, GetLastError returns error 0x00000485".Here is the official explanation of error 0X00000485:
A registration program will attempt to do a LoadLibrary() of the ActiveX/DLL and call DLLRegister() on it. If LoadLibrary() fails and GetLastError() returns 1157 (0x485), this means that a DLL needed by the control cannot be found (Error code 1157 is defined as ERROR_DLL_NOT_FOUND in WINERROR.H).
In addition to WebPr332.OCX, you need to distribute and install four 32-bit support DLLs. Setup copies these files to the REDIST32 subfolder of your control installation folder. They are:
File Version # Date Time Size Notes MFC42.DLL - 4.2.6256 09/13/96 09:47a 1,013,520 Self-register MSVCRT.DLL - 4.20.6201 08/02/96 12:30a 267,536 OLEAUT32.DLL - 2.20.4049 08/09/96 07:49p 473,872 Self-register OLEPRO32.DLL - 4.2.6068 06/19/96 03:21p 76,048 Self-register
If you are installing these four support DLLs as described in the redistribution instructions or the Help file then you should make sure that these are all properly installed and registered on your target system.
You can use a more recent set of MFC DLLs but you must then make sure that they are a matched set. The 32-bit DLLs may be from any version of MFC since 4.2b but they must all be from the same version of MFC. You can run with the 4.2b set included in the Webster Pro release package (and listed above) or a 5.0 set (with itís additional dependencies - see note below) but donít mix some DLLs from 4.2b and some from 5.0.
Note that if you choose to ship with a DLL set more recent than the 4.2b set, you may need to install additional DLLs. Check the documentation for the corresponding version of the compiler for specific MFC OCX redistribution requirements.
If you are using the MFC DLLs only to support a Webster Pro D-Type then you should switch to an S-Type control, which does not require the MFC DLLs.
There are two distinct scenarios that can result in a control failing to instanciate. This failure can occur at design time (when you try to display a form containing the control) or at run time. An error message similar to "You do not have an appropriate license to use this functionality" will usually be displayed in these cases.
This is because the release product uses licensing information that is different from that used by the demo version. The solution is to update the control in your form or dialog template before building the application.
When switching from a beta/demo to a release versions of the control in a forms-based application (VB, VC++, Delphi, C++ Builder etc.), delete the demo Webster Pro Control from the form and then insert the release version in its place to update the license information. Keep the control ID the same (e.g. WebsterPro1) and you will not have to change any code.
This is typically caused by testing your application's Setup or Install program on your development machine. The Setup or Install program properly installs and registers a copy of the control in the SYSTEM directory, but a side effect of this is to disable the control in the development environment, because the control must be installed and registered in the original installation directory for use in design mode.
To re-register the control for design mode usage re-run the original control installation kit on your development machine.
|Copyright © Home Page Software Inc.||firstname.lastname@example.org|