Click to See Complete Forum and Search --> : StdPicture in VC++ ?


zstoja
June 4th, 1999, 08:59 AM
Hi,

Does anybody know how to create StdPicture object in VC++ and load some picture into it?

(CoCreateInstance(CLSID_StdPicture, NULL,
CLSCTX_INPROC_SERVER, ID_IPicture... ? )

Zoran.

Rob
June 4th, 1999, 11:18 AM
You can use the OLECreatePictureIndirect API call to create the picture object.

This method takes in three paramters. The first is a PICTDESC structure. This structure specifies certain attributes of the picture object to be created. The second parameter is the REFIID of the interface that it returns. To get an IPictureDisp pointer back from this method, specify IID_IPictureDisp. The third parameter is boolean, and specifies whether or not the caller is responsible for destroying the handle to the bitmap when they are done with it.

The method returns a (void**). The type of this pointer depends on the REFIID you specify in the second parameter.

Hope this helps:)

rob
June 4th, 1999, 11:18 AM
You can use the OLECreatePictureIndirect API call to create the picture object.

This method takes in three paramters. The first is a PICTDESC structure. This structure specifies certain attributes of the picture object to be created. The second parameter is the REFIID of the interface that it returns. To get an IPictureDisp pointer back from this method, specify IID_IPictureDisp. The third parameter is boolean, and specifies whether or not the caller is responsible for destroying the handle to the bitmap when they are done with it.

The method returns a (void**). The type of this pointer depends on the REFIID you specify in the second parameter.

Hope this helps:)