HeaderPane
Main

SftPicture2 Documentation

Share Link
Print

Sft_SetPictureIDispatch

Store an IPictureDisp pointer in a SFT_PICTURE as a SFT_PICTURE_IDISPATCH slot. Used for OLE picture objects exposed through the IDispatch / IPictureDisp interface (the form returned by COM properties of type OLE_PICTURE).

C

void Sft_SetPictureIDispatch(LPSFT_PICTURE lpPicture, IPictureDisp* IPicDisp);

Parameters

lpPicture

Pointer to a SFT_PICTURE. Must not be NULL.

IPicDisp

IPictureDisp pointer. NULL leaves the slot empty.

Comments

Sft_SetPictureIDispatch calls Sft_ClearPicture internally before assigning the new IPictureDisp 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.

IPictureDisp wraps the same underlying picture types as Sft_SetPictureIPicture (bitmaps, icons, metafiles); use whichever interface the picture-bearing COM source exposes.

See Also SftPicture2 | SFT_PICTURE | SFT_PICTURE_IDISPATCH | Sft_SetPictureIPicture | Sft_IsPictureIDispatch


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