IShellBrowser::GetViewStateStreamIShellBrowser::GetViewStateStream*
*Contents  *Index  *Topic Contents
*Previous Topic: IShellBrowser::GetControlWindow
*Next Topic: IShellBrowser::InsertMenusSB

IShellBrowser::GetViewStateStream


HRESULT GetViewStateStream(
    DWORD grfMode,
    LPSTREAM *ppStrm
   );	

Retrieves an IStream interface that can be used for storage of view-specific state information.

grfMode
Read/write access of the IStream interface. This may be one of the following values:
STGM_READ Requests an IStream suitable for reading.
STGM_WRITE Requests an IStream suitable for writing.
STGM_READWRITE Requests an IStream suitable for reading and writing.
ppStrm
Address that receives the IStream interface pointer.

This method is used to save and restore the persistent state for a view (the icon positions, the column widths, and the current scroll position, for example).

Notes to Callers

Use GetViewStateStream when the view is being created to read in the saved view state and also when the view is being closed to save any changes to the view state. Typically, the view calls this method with STGM_READ when creating a view window and with STGM_WRITE when the SaveViewState method of its IShellView interface is called.

Notes to Implementers

Each shell view should have its own view stream. Windows Explorer implements a most recently used (MRU) list of view streams that are stored on a per-user basis in the registry.

See also IShellBrowser


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.