IShellView::CreateViewWindow method (shobjidl_core.h)

Creates a view window. This can be either the right pane of Windows Explorer or the client window of a folder window.

Syntax

HRESULT CreateViewWindow(
  [in]  IShellView        *psvPrevious,
  [in]  LPCFOLDERSETTINGS pfs,
  [in]  IShellBrowser     *psb,
  [in]  RECT              *prcView,
  [out] HWND              *phWnd
);

Parameters

[in] psvPrevious

Type: IShellView*

The address of the IShellView interface of the view window being exited. Views can use this parameter to communicate with a previous view of the same implementation. This interface can be used to optimize browsing between like views. This pointer may be NULL.

[in] pfs

Type: LPCFOLDERSETTINGS

The address of a FOLDERSETTINGS structure. The view should use this when creating its view.

[in] psb

Type: IShellBrowser*

The address of the current instance of the IShellBrowser interface. The view should call this interface's AddRef method and keep the interface pointer to allow communication with the Windows Explorer window.

[in] prcView

Type: RECT*

The dimensions of the new view, in client coordinates.

[out] phWnd

Type: HWND*

The address of the window handle being created.

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

Notes to Calling applications

Call this method when the view needs to be created.

Notes to Implementers

Create your view window and restore any persistent state by calling the GetViewStateStream method. Store the IShellBrowser pointer for further use.

Requirements

Requirement Value
Minimum supported client 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.0 or later)

See also

IShellView