NO

Author Topic: displaying an image file - need help!  (Read 2813 times)

tkaro

  • Guest
displaying an image file - need help!
« on: June 21, 2010, 08:38:33 PM »
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

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: displaying an image file - need help!
« Reply #1 on: June 21, 2010, 10:57:41 PM »
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 ;)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: displaying an image file - need help!
« Reply #2 on: June 22, 2010, 08:10:09 AM »
Here is another example that use OleLoadPicture too:

http://www.johnfindlay.plus.com/lcc-win32/gengfx/JPG-Prof.zip


May the source be with you

sapero

  • Guest
Re: displaying an image file - need help!
« Reply #3 on: June 22, 2010, 09:29:59 PM »
Code: [Select]
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.