   C++ windows active desktop wallpapers
  Since I have many many wallpapers, most of which I like, I've written a little program that is run during windows startup that searches some directories and randomally chooses a wallpaper. To set the wallpaper, I'm using active desktop (of which I know little about).Some of my wallpapers are at a different resolution than my desktop, so I was wondering if there was a way to find, using the active desktop, or anything else, the size of the wallpaper, and if it is a different size than the desktop resolution, I'll just be able to set the desktop options to center instead of stretch.I know that I can look at the headers for the picture files, but I'd really like to avoid having to add the functionality for reading the header of a picture file, especially if there is a windows equivalent that does the same thing.   
  I dunno whether IActiveDesktop Interface  will help u or not? Or another example from CodingForFun.   ;  You can try LoadImage followed by GetObject with a BITMAP structure, but considering how large images can be it may be worthwhile to take the faster method of just reading the header to obtain the size.See here for information on the bitmap file format. I believe JPEGs are the other supported image type for wallpapers.   ;Quote:Original post by mutexYou can try LoadImage followed by GetObject with a BITMAP structure, but considering how large images can be it may be worthwhile to take the faster method of just reading the header to obtain the size.See here for information on the bitmap file format. I believe JPEGs are the other supported image type for wallpapers.Thanks, I'll take a look at that.Also, *.png files can also be used as wallpapers.   ;Quote:...and if it is a different size than the desktop resolution...An easy way to obtain this information is to call GetSystemMetrics with [SM_CXSCREEN / SM_CYSCREEN] or GetDeviceCaps with [HORZRES / VERTRES].   