IShellView2::CreateViewWindow2 method (shobjidl_core.h)

Used to request the creation of a new Shell view window. It can be either the right pane of Windows Explorer or the client window of a folder window.

Syntax

HRESULT CreateViewWindow2(
  LPSV2CVW2_PARAMS lpParams
);

Parameters

lpParams

Type: LPSV2CVW2_PARAMS

A pointer to an SV2CVW2_PARAMS structure that defines the new view window.

Return value

Type: HRESULT

Returns a success code if successful, or a COM error code otherwise. Use the SUCCEEDED and FAILED macros to determine whether the operation succeeded or failed.

Remarks

This method supersedes CreateViewWindow. With CreateViewWindow2, developers are not restricted to the standard view modes provided by CreateViewWindow, but may also create their own. All view modes are now identified by their GUID.

The size of the structure, previous view window, folder settings, parent Shell browser, and view rectangle are passed into IShellView2::CreateViewWindow2 in the first five members of lpParams. The method is responsible for creating the new window and passing back its window handle and the GUID of the view mode in the last two parameters. IShellView2::CreateViewWindow2 should call the parent browser's IShellBrowser::AddRef method and store the interface pointer. It can be used for communication with the Windows Explorer window.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll (version 4.71 or later)

See also

IShellView2

IShellView2::GetView