IPicture::get_hPal method

Retrieves a copy of the palette currently used by the picture object.

Syntax


HRESULT get_hPal(
  [out] OLE_HANDLE *phPal
);

Parameters

phPal [out]

A pointer to a variable that receives the palette handle. The variable is set to NULL on failure.

Return value

This method supports the standard return values E_FAIL and E_OUTOFMEMORY, as well as the following values.

Return codeDescription
S_OK

The height was returned successfully.

S_FALSE

This picture has no palette. The variable that phpal points to was set to NULL.

E_POINTER

The value of phPal is not valid. For example, it may be NULL.

 

Remarks

Notes to Callers

If the picture object has ownership of the picture, it also has ownership of the palette and will destroy it when the object is itself destroyed. Otherwise the caller owns the palette. The fOwn parameter to OleCreatePictureIndirect determines ownership. OleLoadPicture sets fOwn to TRUE to indicate that the picture object owns the palette.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IPicture is defined as 7BF80980-BF32-101A-8BBB-00AA00300CAB

See also

IPicture

 

 

Show: