Read & Show any bitmaps in directory

Hi, sorry this is so newb. Ive been searching for hours and Im stuck.

I need to make a program that will load and display one at a time any .bmp files found in the directory. Can this be done with C, or with win32? I learned C from the tutorials on this site, but after a day trying to learn windows programming, I realize everything is teaching me to hardcode bitmaps into the compiled exe! Looks like I wasted a day--

If someone could at least point me in the direction that leads to victory, I'd be grateful.
to scan a directory for files, you can use FindFirstFile / FindNextFile / FindClose family of functions.

to load a bitmap from a file, you can use the LoadImage function.

From there you put the bitmap in a DC and blit it to the display with BitBlt.

More information on all these functions (as well as examples) can be found at MSDN:

http://msdn.microsoft.com/en-us/default.aspx

Just type the function name in the search box.
Great! I will get started. I was doubting if loadimage would allow the pickup of images at runtime. Great news that it can.
Why not just use something like irfanview?

(Unless you want to code it all yourself...)
Yeah, I'm going to need to do more than just display the pictures, It's just the part that has me stuck. I'm putting together some tools to help with data analysis. I've put together all the crazy math stuff, but theres some stuff that just has to be done with the human eye. So I'm trying to add the ability to one by one, show an image in the folder, let the user write a note about it and store that data.

Finally got the gcc compiler to work with the .rc files all the samples seem to use, so I can start trying things out now.
Topic archived. No new replies allowed.