Click to return to the Reusing Browser Technology home page    
IHTMLWindow2::navigate Me...     IHTMLWindow2::prompt Meth...     IHTMLWindow2 Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLWindow2::open Method


Opens a new Web browser window.

Syntax

HRESULT open(
    BSTR url,
    BSTR name,
    BSTR features,
    VARIANT_BOOL replace,
    IHTMLWindow2 **pomWindowResult
);

Parameters

url
String (BSTR) that specifies the URL of the document to display in the new window.
name
String (BSTR) that specifies the name of the new window.
features
String (BSTR) that specifies the ornaments to add to the new window. This parameter is a list of items separated by commas. Each item consists of an option and a value, separated by a colon (for example, "fullscreen:yes,toolbar:yes"). The following table lists the supported options.

Attribute    Values    Description   
fullscreen    yes/no/1/0    Browser displays in full-screen (TRUE) or normal window (FALSE) mode.
toolbar yes/no/1/0 Browser toolbar (Back and Forward buttons, and so on)
location yes/no/1/0 Input field for entering URLs directly into the browser.
directories yes/no/1/0 Directory buttons.
status yes/no/1/0 Status line at bottom of window.
menubar yes/no/1/0 Menu bar.
scrollbars yes/no/1/0 Horizontal and vertical scroll bars are enabled.
resizable yes/no/1/0 Do resize handles appear at the edge.
width pixel Width of window; defaults to pixels.
height pixel Height of window; defaults to pixels.
top pixel Top position, in pixels, in relation to the desktop.
left pixel Left position, in pixels, in relation to the desktop.

replace
Address of a VARIANT Boolean structure that replaces the history flag. If VARIANT_TRUE, the URL that is loaded into the new page replaces the current entry in the window's browsing history. If VARIANT_FALSE, a new entry is created in the window's browsing history.
pomWindowResult
Address of a pointer to an IHTMLWindow2 interface that receives the new window object.

Return Value

Returns S_OK if successful, or an error code otherwise.

Windows CE

For Microsoft® Windows® CE only, programmatic access to documents in windows created with the open method is not supported. Additionally, all windows are opened full screen.

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.