IOleUIObjInfoA::SetViewInfo method (oledlg.h)

Sets the view information associated with the object.

Syntax

HRESULT SetViewInfo(
  [in] DWORD   dwObject,
  [in] HGLOBAL hMetaPict,
  [in] DWORD   dvAspect,
  [in] int     nCurrentScale,
  [in] BOOL    bRelativeToOrig
);

Parameters

[in] dwObject

Unique identifier for the object.

[in] hMetaPict

The new icon.

[in] dvAspect

The new display aspect or view.

[in] nCurrentScale

The new scale.

[in] bRelativeToOrig

The new scale of the object, relative to the origin. This value is TRUE if the scale should be relative to the original scale of the object. If FALSE, nCurrentScale applies to the object's current size.

Return value

This method returns S_OK on success. Other possible return values include the following.

Return code Description
E_ACCESSDENIED
Insufficient access permissions.
E_FAIL
The operation failed.
E_INVALIDARG
The specified identifier is invalid.
E_OUTOFMEMORY
There is insufficient memory available for this operation.

Remarks

Notes to Implementers

You should apply the new attributes (icon, aspect, and scale) to the object. If bRelativeToOrig is set to TRUE, nCurrentScale (in percentage units) applies to the original size of the object before it was scaled. If bRelativeToOrig is FALSE, nCurrentScale applies to the object's current size.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header oledlg.h

See also

DVASPECT

IOleUIObjInfo