## IE 3.0/4.0 Additional Command IDs

## IE 30 : Additional Command IDs

OLECMDID_UPDATECOMMANDS

> Direction: up (the containee processes)

> Parameter: N/A

> It indicates that at least one of command status (which the container can query by calling ICT::QueryStatus) has been changed. If the container has any UI (typically toolbar buttons), it should query the status of all commands to disable/enable them correctly.

OLECMDID_REFRESH

> Direction: down (the container processes)

> Parameter: One of following as VT_I4 - Optional (default is OLECMDIDF_REFRESH_NORMAL)

> > OLECMDIDF_REFRESH_NORMAL -- Normal refresh. If the data is in the cache, use it.

> > OLECMDIDF_REFRESH_IFEXPIRED -- If the data in the cache is expired, get it from the server.

> > OLECMDIDF_REFRESH_CONTINUE -- Continue stopped rendering.

> > OLECMDIDF_REFRESH_COMPLETELY -- Don't get any data from the cache.

> This command tells the Document to update the view.

OLECMDID_STOP

> Direction: up and down

> Parameter: N/A

> When the container receives this command, it aborts the pending navigation (a hyperlink navigation that the browser is waiting for the server to respond) if any. When the container receives this command, it stops any subsequent download (such as embedded images) and other things [??? I don't remember -- what's the different from OLECMDID_STOPDOWNLOAD ???].

OLECMDID_HIDETOOLBARS

> Direction: down

> Parameter: N/A

> When the containee receives this command, it toggles the view state of its own toolbars. When IE is opening a document in the browser window, it sends this command from within its IOleInPlaceSite::OnUIActivate member.

OLECMDID_SETPROGRESSMAX

> Direction: up

> Parameter: uMax as VT_I4

> This command is always used with OLECMDID_SETPROGRESSPOS. The uMax specifies the scale of the progress bar (which is displayed by the container).

OLECMDID_SETPROGRESSPOS

> Direction: up

> Parameter: uPos as VT_I4

> This command is always used with OLECMDID_SETPROGRESSMAX. The uPos specifies the current progress position relative to uMax.

OLECMDID_SETPROGRESSTEXT

> Direction: up

> Parameter: bstrText as VT_BSTR

> When the container receives this command, it displays the specified text in its status bar. IE has two layers of text field in its status bar, one for the "status text" (which is set by IOleInPlaceFrame::SetStatusText) and another for the "progress text" (specified by this command). The "status text" is typically used for menu help (which you see when you highlight a menuitem) or a mouse help (which you see when you move a cursor over on a certain item -- such as a hyperlink on HTML page). The "progress text" is typically used for progress notification, such as "finding site...", "downloading image...", etc. The "progress text" is visible only when the "status text" is empty.

OLECMDID_SETTITLE

> Direction: up

> Parameter: bstrTitle as VT_I4

> When the container receives this command, it puts the specified text as the title of the document typically on the title bar. IE displays URL until it receives this command.

OLECMDID_SETDOWNLOADSTATE

> Direction: up

> Parameter: bDownloading as VT_I4 or VT_BOOL

> When the continer receives this command, it turn on or off a certain UI which indicates the "downloading" state (the animated icon in the case of IE). If bDownloading is non-zero, it turn on the UI. If bDownloading is zero, it calls IOleCommandTarget::QueryStatus with OLECMDID_STOPDOWNLOAD and turn off the UI only if it's diabled (MSOCMDF_ENABLED is not set).

OLECMDID_STOPDOWNLOAD

> Direction: down

> Parameter: N/A

> Stops the on going downloading on the page.

## IE 40 : Additional Command IDs (draft)

OLECMDID_ONTOOLBARACTIVATED

> Direction: down

> Parameter: N/A

> This command will be sent from the container (the Internet Explorer frame window) to the document object when one of frame-owned toolbars (such as the address bar) got the input focus.

OLECMDID_FIND (reserved for future enhancement)

OLECMDID_DELETE

> Direction: T.B.F. [MattSq, SatoNa]

> Parameter: N/A

> T. B. F.

OLECMDID_HTTPEQUIV

> Direction: up

> Parameter: bstrHttpEquiv as VT_BSTR

> This command will be sent from the document object (HTML viewer) to the container (the Internet Explorer) when the parser fins <META HTTP-EQUIV> tag in it. The bstrHttpEquiv contains the parameter to that meta tag, which is equivalent to an HTTP header. The document object may send this command more than once, but must send OLECMDID_HTTPEQUIV_DONE after all the <META HTTP-EQUIV> tags are processed.

OLECMDID_HTTPEQUIV_DONE

> Direction: up

> Parameter: N/A

> This command will be sent from the document object (HTML viewer) to the container (the Internet Explorer) when the parser knows there will be no other <META HTTP-EQUIV> tag in that page. The document object must send this command after sending one or more OLECMDID_HTTPEQUIV commands.

OLECMDID_ENABLE_INTERACTION (new in Beta-2)

> Direction: down

> Parameter: fEnable as VT_I4

> This command will be sent from the container (typically a browser frame) to the document (typically an HTML viewer) to either pause (fEnable == 0) or resume (fEnable != 0) any audio or animation on the document. IE 4.0 browser uses this command to appropriately pause those activities when either the browser window is minimized or totally covered by other windows.

OLECMDID_ONUNLOAD (new in Beta-2)

> Direction: down

> Parameter: N/A

> Return Value: S_FALSE indicates that the hyperlink operation or close operation should be canceled and keep the current document accessible.

> This command will be sent from the container (typically a browser frame) to the document when either it's about to initiate a hyperlinking operation (navigation) or close the window. It gives the current document to save any non-confirmed data (typically a data bound HTML page) back to the server. The document usually ask the user either (1) save, (2) don't save and continue or (3) cancel the operation. When the user chooses to cancel the operation, the document returns S_FALSE and the browser cancels the operation.

> It's important to recognize that this "non-confirmed" state is different from a dirty state (IPersistFile::IsDirty()) of the document, which applies to the document itself. This state is the state of fields filled by the user when the document is used as a form (to input data to a database).

> By the way, this command is sent to the document when the user initiate the hyperlink operation (typically by clicking a hyperlink on the page or typing an URL in the address bar). Once the document returns S_OK to this command, the browser does not send this command again even though the user modifies some field before the new document became available (notice that the navigation is an asynchronous operation and the current document remains interactive while the browser is waiting for the response from the server).

Go to the home page