The VCI WebViewer Control Interface

WebViewer properties, methods, events and buttons are described.


Buttons

The buttons are presented on the title bar, which is usually placed at the top of the display area. Every button has a corresponding method. Use the ButtonMask property to show or hide individual buttons.


Properties

short BorderStyle
Stock property.

short HWnd
Stock property.

BOOL Enabled
Stock property.

short BevelStyleInner
Inner bevel style:

0 - None
1 - Indent
2 - Outdent

short BevelStyleOuter
Outer bevel style (see BevelStyleInner).

long BevelWidth
Bevel width

OLE_COLOR BevelColorTop
Color of the flat surface between the bevels.

OLE_COLOR BevelColorDark
Bevel shade color.

OLE_COLOR BevelColorLight
Bevel highlight color.

LPDISPATCH Font
Stock property - used in title and URL windows.

LPDISPATCH FontAddress
Address font.

LPDISPATCH FontBlockQuote
Block quote font.

LPDISPATCH FontDir
Directory font.

LPDISPATCH FontExample
Example font.

LPDISPATCH FontHeading1
Heading 1 font.

LPDISPATCH FontHeading2
Heading 2 font.

LPDISPATCH FontHeading3
Heading 3 font.

LPDISPATCH FontHeading4
Heading 4 font.

LPDISPATCH FontHeading5
Heading 5 font.

LPDISPATCH FontHeading6
Heading 6 font.

LPDISPATCH FontListing
Listing font.

LPDISPATCH FontMenu
Menu font.

LPDISPATCH FontNormal
Normal font.

LPDISPATCH FontPreformatted
Preformatted font.

short ShowUrlBar
Determines the visibility and position of the URL bar:

0 - None
1 - Top
2 - Bottom

short ShowTitleBar
Determines the visibility and position of the Title bar (see ShowUrlBar).

CString PageURL
Reflects the currently active (visible) page, which may be an HTML document, pure text or pure image. Setting this property initiates loading and display of the page specified by the URL.

CString PageTitle
Reflects the page title (read-only)

OLE_COLOR AnchorColor
Color of hyperlink text.

CString HomePage
URL to be loaded when the HomePage button is clicked.

CString DownloadDir
The default directory for downloads and saved files.

long PagesToCache
The number of pages to cache.

OLE_COLOR BackColor
Stock property - the default page background color.

BOOL IgnoreBaseInFile
Causes any BASE tag URL to be ignored when constructing full URLs from partial references. In addition, image references are treated as partial references (based on the underlying page URL) even when fully qualified. This is useful when loading a page which has been captured to local disk, since images which are available on local disk are retrieved from there rather than from the original (remote) source, and so are hyperlinked pages.

short LoadStatus
A status code for the currently active page:

0 - Page load done.
1 - Connecting to host.
2 - Connected, waiting.
3 - Page text loading.
4 - Images loading.
5 - Load failed.
5 - Idle (no page).

OLE_COLOR ForeColor
Stock property - default for text.

long MaxSockets
Maximum number of active sockets per control instance.

long ImageCacheKB
Maximum image cache size in KB.

long MaxPageLoads
Maximum number of concurrent page loads allowed.

long MarginHorizontal
The horizontal margin in pixels.

long MarginVertical
The top margin in pixels.

BOOL LoadImages
Determines whether embedded images are loaded.

BOOL ShowReferer
HTTP Referer header switch.

CString AuthenticName
Name for Basic authenication.

CString AuthenticPassword
Password for Basic authentication.

CString FromName
HTTP From header field.

CString BrowserName
HTTP User-Agent header field.

long ButtonMask
Enables/disables title bar buttons:

0x0001 - Home button mask
0x0002 - Open button mask
0x0004 - History button mask
0x0008 - Check button mask
0x0010 - Save button mask
0x0020 - Back button mask
0x0040 - Forth button mask
0x0080 - StopGo button mask
0x0100 - Movie button mask
0x0200 - URL button mask
0x0400 - Title display mask

CString ProxyServerHTTP
Proxy server name.

long ProxyPortHTTP
Proxy server port.


Methods

void AboutBox()
Stock method.

short DismissPage(LPCTSTR URL)
Remove the page from cache.

long GetContentSize(LPCTSTR URL)
Byte count for the specified page, according to the header.

long GetContentSizeRead(LPCTSTR URL)
Actual byte count available in the specified page.

CString GetContentType(LPCTSTR URL)
The content type string for the page, from the header.

CString GetContent(LPCTSTR URL, long StartOffset, long Length)
Retrieve a range of raw bytes from the page.

short GetHiddenFlag(LPCTSTR URL)
Return the hidden state of the page.

short SetHiddenFlag(LPCTSTR URL, BOOL Hidden)
Cause the specified page to be concealed or revealed.

long GetLinkCount(LPCTSTR URL)
Return the number of hyperlinks in the page.

CString GetLinkURL(LPCTSTR URL, long Index)
Get the specified URL from the page.

CString GetRedirectedURL(LPCTSTR URL)
Final URL corresponding to the specified URL, after any redirection.

short GetStatus(LPCTSTR URL)
Get a status code for the specified page (see LoadStatus).

long GetTextSize(LPCTSTR URL)
Get the byte count of pure text, no tags.

CString GetText(LPCTSTR URL, long StartOffset, long Length)
Extract pure text from the page, no tags.

CString GetTitle(LPCTSTR URL)
Get the page title.

short LoadPage(LPCTSTR URL, short Hidden)
Initiate a page load.

void ShowDir()
Display the built-in directory page.

void Refresh()
Stock method.

These are the button-equivalent methods:

void GoHome()
Display the page specified by the HomePage property.

void ShowOpenFileDialog()
Display the Open File dialog box.

void ShowURLDialog()
Display the URL entry dialog box.

void ShowHistory()
Display the history page.

void ShowStatus()
Display the status page.

short SaveToDisk(LPCTSTR FileName)
Save the current page to disk, synthesizing a file name if necessary. The file is written to the directory specified by the SaveDir property.

void PageBack()
Display the previous page in the history list.

void PageForth()
Display the next page in the history list.

short Cancel()
Cancel the loading of the current (visible) page, if it is loading. Harmless otherwise.

short Reload()
Reload the current page.


Events

void DoClickURL(BSTR* SelectedURL, BOOL* Cancel)
This event is fired when the user clicks on a hyperlink. An interested container may inspect the clicked URL in stringURL and take one of the following courses:

void DoLoadImage(BSTR* ImageURL, BOOL* Cancel)
Presents image URL to the container -- set Cancel to TRUE to cancel the load.

void HyperlinkTransition(BSTR* URL, boolean IsOverLink)
Fired when the mouse enters or exits a hyperlink zone. When IsOverlink is TRUE, the hyperlink is specified by URL.

void KeyDown(short* KeyCode, short Shift)
Stock event.

void LoadComplete(BSTR* URL, short Status)
When a page load is finished, this event conveys the load status.

void MouseDown(short Button, short Shift, long xPixel, long yPixel)
Stock event.

void MouseMove(short Button, short Shift, long xPixel, long yPixel)
Stock event.

void MouseUp(short Button, short Shift, long xPixel, long yPixel)
Stock event.

The VCI WebViewer Control was created by Home Page Software.