displaying an image file - need help!

Started by tkaro, June 21, 2010, 08:38:33 PM

Previous topic - Next topic

tkaro

Hi,

I'm working on a project that requires that I learn to display image files, and maybe even movie files, using C++. I found a lot of things online about programs and libraries that can be used, but none of them worked on my Microsoft visual studio.

Given that I am not a computer programmer, i know little about C++ and all the errors don't mean a thing to me.

I finally found a program that should work with the Pelles C compiler, but it is also giving me errors! can someone help me?

The code is attached

AlexN

I am not sure what the program should do. As far as I can see it is a BCX (a Basic to C compiler) program. Perhaps you can get more help in a forum there. But MrBCX look also in this forum. ;)

If it is enough to compile the program, look at the attachment. :)
best regards
Alex ;)

TimoVJL

May the source be with you

sapero

if (!OleLoadPicturePath(L"http://forum.pellesc.de/Smileys/default/smiley.gif",
   0,0,0, IID_IPicture, &pic))
{
  // todo
}

Much simpler than OleLoadPicture, eh? You can pass an URL or local file (full) path.

By the way - LR_COPYRETURNORG does what it says, it returns the image you passed, instead a copy. When you Release picture object, that image will be no more valid.