Manages a picture object and its properties. Picture objects provide a language-neutral abstraction for bitmaps, icons, and metafiles. As with the standard font object, the system provides a standard implementation of the picture object. Its primary interfaces are IPicture and IPictureDisp, the latter being derived from IDispatch to provide access to the picture's properties through Automation. A picture object is created with OleCreatePictureIndirect.
The picture object also supports the outgoing interface IPropertyNotifySink, so a client can determine when picture properties change. Because the picture object supports at least one outgoing interface, it also implements IConnectionPointContainer and its associated interfaces for this purpose.
The picture object also supports IPersistStream so that it can save and load itself from an instance of IStream. An object that uses a picture object internally would normally save and load the picture as part of the object's own persistence handling. The function OleLoadPicture simplifies the creation of a picture object based on stream contents.
pasted from MSDN
Sample:
VC++
1: // Initialize the PICTDESC struct
2: PICTDESC oPDesc;
3: oPDesc.cbSizeofstruct = sizeof(oPDesc);
4: oPDesc.picType = PICTYPE_ICON;
5: oPDesc.icon.hicon = hIcon;
6:
7: // Construct a IPictureDisp interface
8: return OleCreatePictureIndirect(&oPDesc, riid, TRUE, (LPVOID *)ppResult);
VBA
1: Sub TestIPictureDisp()
2: Dim oPic As IPictureDisp
3: Set oPic = LoadPicture( to the picture>)
4: End Sub