+ 1
How to display a picture from a file on the screen using winapi?
4 Respostas
+ 3
The WinAPI's LoadImage function supports only bitmap images. So to use other formats for images, either use the function OleLoadPicturePath:
https://stackoverflow.com/questions/13192731/win32-api-open-a-jpg-in-a-picture-control-c
https://msdn.microsoft.com/en-us/library/windows/desktop/ms678485(v=vs.85).aspx
https://cboard.cprogramming.com/windows-programming/130563-loading-displaying-other-format-images-than-bmp.html
Or the Windows Imaging Component API:
https://msdn.microsoft.com/en-us/library/ee719902(v=VS.85).aspx
You may also check out :
https://www.codeproject.com/Articles/3283/Library-to-display-an-image-JPG-GIF-BMP-in-lin
Or use GDI+ // Not WinAPI, Agreed.
supercomputingblog.com/graphics/how-to-load-a-jpg-with-c
https://social.msdn.microsoft.com/Forums/vstudio/en-US/0a61f0f3-3aed-4bef-a18b-d2919cf78a09/how-to-load-images-bmp-jpeg-gif-tiff?forum=vclanguage
+ 1
Thanks Jamie
0
English?