I start a new thread about this. I need just a piece of code that reads a bmp file. I NEED this. Every program i made used custom graphic files, and a very unpractical graphic editor made by me . It would be more comfortable to use paint to make graphics . I need only a piece of codew that shows me how to read the content of a bmp file.

Windows can do that for you with the LoadImage() function, and that returns a windows HANDLE to the image resource, which you must select into a compatible DC to display or access its pixel data (as usual).

If you want to access the image differently (for example, if you have your own image display routines, etc.) you'll have to do as iamthwee suggests.

Good luck!

Windows can do that for you with the LoadImage() function, and that returns a windows HANDLE to the image resource, which you must select into a compatible DC to display or access its pixel data (as usual).

If you want to access the image differently (for example, if you have your own image display routines, etc.) you'll have to do as iamthwee suggests.

Good luck!

the article about the .bmp file format was useful enough. Thanks!