Author
Topic: Handling bitmaps (Read 789 times)

Here is a console application saving the desktop to a bitmap file. No any COM or GDI+ techniques and just plain API.

Steps to save the desktop to a bitmap :

- Get the width and height of the desktop- Get the device context ( DC ) of the desktop and create a compatible DC- Create a compatible bitmap.- Copy the image to the new DC.- Fill the BITMAPINFOHEADER and BITMAPFILEHEADER structures.- Get the bits of the bitmap to be saved to disc.- Save the bitmap structures and color data to disc.

Open a cmd, put it in a corner of the screen and then run the program (using the options needed)

This program is also very useful to play a little pranks to my girl (who knows little about PCs...) When the .bmp is full sized you can move the mouse above of the image but nothing seems to work when you do clicks on the icons!