IPreviewHandler::SetRect method

Directs the preview handler to change the area within the parent hwnd that it draws into.

Syntax

HRESULT SetRect(
  const RECT *prc
);

Parameters

prc

Type: const RECT*

A pointer to a RECT to be used for the preview.

Return Value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If called before the preview handler window has been created, the new RECT replaces the RECT previously received in the IPreviewHandler::SetWindow call.

If called after the preview handler window has been created, the preview handler window must be resized.

If the preview handler is already rendering, then the preview must be resized without interrupting the render process.

Requirements

   
Minimum supported client Windows Vista, Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
Redistributable Windows Search 4 or later