OleLoadPicture? or OleLoadPicturePath?
The former reads from an IStream and the stream must be one constructed from
IPersistStream::Write() on a valid OLE IPicture implementation.
Try using:
CComPtr<IPicture> spPict;
OleLoadPicturePath(OLESTR("MyImage.jpg"), NULL, 0, CLR_NONE, IID_IPicture,
reinterpret_cast<LPVOID*>(&spPict));
Ciao,
Dee
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ehsan Akhgari
Sent: Monday, February 16, 2004 12:43 PM
To: [EMAIL PROTECTED]
Subject: [msvc] OleLoadPicture( ) problem
I tried to use the IPicture interface, but I have faced a problem.
OleLoadPicture( ) returns CTL_E_INVALIDPICTURE, and it doesn't matter what
kind of input file is used (jpg, gif, bmp). What can be the problem? MSDN
doesn't seem to show any results...
-------------
Ehsan Akhgari
Farda Technology (www.farda-tech.com)
List Owner: [EMAIL PROTECTED]
[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]
There are times when we must sink to the bottom of our misery to understand
truth, just as we must descend to the bottom of a well to see the stars in
broad daylight.
- Vaclav Havel
_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
subscription changes, and list archive.