c++ draw images on bitmap and save
//background feel free to skip
I am creating a animated clock for my Windows desktop background.
Basically I create a bmp image with code using pre-drawn images (the
numbers of the clock) then a save the bmp image and set the desktop
background to that image. I tried using c# and .Net but inorder to set the
desktop background I have to call a WinApi function
(SystemParametersInfo). Calling this function from c# takes almost a
second. Too long for an animation.
So now I want to do the same except in c++, I hope calling
SystemParametersInfo will be faster from unmanaged code.
//the question
I created a Win32 console project using Visual Studio 2012, and I managed
to embed the pre-drawn images as resources. Now I need to combine the
images onto a single bitmap and save it to the hdd. It has been four years
since I last programmed in c++ so I have no idea how to draw a image and
save it.
The code I found when googling all have to do painting to the screen,
which I obviously don't want to do.
So how do create a bitmap, draw a resource image (also a bitmap) on it,
and save it all in c++?
Thanks for any assistance.
No comments:
Post a Comment