I am attempting to write a program to randomly select images out of a directory and set them as a desktop background. I know windows has a tool to do this, but I thought it would be interesting to it myself.
I was able to set the background without trouble, but when I set it to loop the memory usage climbs every time an image is loaded and set. Using the task manager I was able to determine that the number of GDI Objects is not increasing though. Below is the function I use to import and resize the images.