Board index » cppbuilder » TPicture to IID_PictureDisp

TPicture to IID_PictureDisp


2003-10-10 01:38:48 AM
cppbuilder69
Hi,
I could really use some help converting a TPicture to an IID_PictureDisp.
I have tried this
mPicture = new TPicture;
mPicture->LoadFromFile("C:\\Test.bmp");
IPictureDisp* lPictureDisp = 0;
if (! mPicture->QueryInterface(IID_IPictureDisp, (LPVOID*) PictureDisp))
{
// worked
}
But I never get to // worked :(
Thx
Jochen
 
 

Re:TPicture to IID_PictureDisp

Jochen,
Quote
I could really use some help converting a TPicture
to an IID_PictureDisp.
I've never used it myself, but have a look at the OleGetPicture() method.
Alternatively, the following post demonstrates how to convert a bitmap
(given its handle; e.g., Bitmap->Handle) to an IPicture object:
tinyurl.com/qlti.
Good luck,
Damon (TeamB)