HeaderPane
Main

SftPicture2 Documentation

Share Link
Print

Sft_SetPictureIPicture

Store an IPicture pointer in a SFT_PICTURE as a SFT_PICTURE_IPICTURE slot. Used for OLE picture objects exposed through the IPicture interface (the form returned by OleLoadPicture / OleCreatePictureIndirect).

C

void Sft_SetPictureIPicture(LPSFT_PICTURE lpPicture, IPicture* IPic);

Parameters

lpPicture

Pointer to a SFT_PICTURE. Must not be NULL.

IPic

IPicture pointer. NULL leaves the slot empty.

Comments

Sft_SetPictureIPicture calls Sft_ClearPicture internally before assigning the new IPicture pointer.

Reference counting: the SFT_PICTURE stores the raw pointer without calling AddRef. The application is responsible for ensuring the picture object outlives the SFT_PICTURE - typically by keeping its own reference and calling Release after the host control no longer needs the picture.

IPicture and Sft_SetPictureIDispatch (IPictureDisp) wrap the same underlying picture types (bitmaps, icons, metafiles); use whichever interface the picture-bearing COM source exposes.

See Also SftPicture2 | SFT_PICTURE | SFT_PICTURE_IPICTURE | Sft_SetPictureIDispatch | Sft_IsPictureIPicture


Last Updated 05/09/2026 - (email)
© 2026 Softel vdm, Inc.