Views::Add method

The Add method adds a view at a specified root node.

Syntax

Views.Add( _
  ByVal Node As Node, _
  ByVal ViewOptions As ViewOptions _
)

Parameters

Node

The node to serve as the root of the added view.

ViewOptions

This parameter can be one or more of the following ViewOptions enumeration types. These flags can be combined using a bitwise OR operation.

ViewOption_Default

The view is added with default settings.

ViewOption_ScopeTreeHidden

The view is added with the scope tree pane hidden. The user will not be able to show the scope tree, as the Console Tree check box will be disabled in the Customize View dialog.

ViewOption_NoToolBars

The view is added with toolbars hidden.

ViewOption_NotPersistable

The view is temporary (without persistence capability).

Return value

This method does not return a value.

Examples

' Add a new view.
' objRoot is a Node object, set to the Document's RootNode.
objViews.Add objRoot, _
         ViewOption_ScopeTreeHidden Or _
         ViewOption_NoToolBars

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
MMCObj.h
IDL
MMCObj.idl
DLL
Mmc.exe
IID
IID_Views is defined as D6B8C29D-A1FF-4D72-AAB0-E381E9B9338D

See also

ViewOptions

Views.Count

Views.Item