vcWebCommand@

Platform

.NET(including Win32)

Purpose

To issue a command to a Microsoft Web Browser.

Syntax

INTEGER FUNCTION vcWebCommand@(dialog, controlName, id [, pvaIn])
VCWDialog dialog
STRING controlName
INTEGER id
OBJECT pvaIn

Controls

Explorer_Box

Description

A Silverfrost Explorer_Box provides easy access to a Microsoft Web Browser control that can be used as a browser and also as simple HTML WYSIWYG editor. The vcWebCommand@ function provides commands such as "Go Back" for browsing and "Make Bold" for editing.

id is an integer command identifier. Some commands require an input value pvaIn. When required it is usually a string.

A full list of id values can be obtained from the Microsoft documentation for the Exec function in the IOleCommandTarget interface. These commands have the IDM_ prefix. vcWebCommand@ also provides access to the Microsoft ExecWB function but in this case the id value is obtained by adding the offset 1000 to the Microsoft identifier used in the ExecWB command. These have the OLECMDID_ prefix. Microsoft have not implemented all of the commands that they list and in some cases Visual ClearWin uses a listed identifier but calls a different Microsoft function or provides its own coding. For examples of command identifiers that are known to work, see solutions 17, 18 and 19 in the Visual ClearWin demonstration pack.

Note that some commands are not fully functional. For example IDM_PRINT currently only works for local files. Also you cannot browse the Internet after viewing a local file.

Return value

vcWebCommand@ returns zero if successful or one of the Microsoft error parameters E_NOTIMPL, E_INVALIDARG, E_NOINTERFACE, E_FAIL, E_UNEXPECTED and OLECMDERR_E_CANCELED whose values are listed in the file VC.ins.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited