You are here:

C++/Making Prank Programs for C++ Practice


I want to create some prank programs using C++ if at all possible.  The one I would like to do most would be to have the windows desktop appear upsidedown on the monitor(with a hot key to close the program). I have Microsoft Visual C++ 6.0, but I am not sure how to even begin to create this.  I took a basic college C++ class so I know how to do switches, do/while loops, true/false statements, all the very basic stuff. I know how to tie in the clock and date too, but I have no idea on where to begin to make the screen appear to be flipped.  I would appreciate it if I could be pointed in the right direction.  I would like to make it work in windows xp professional since thats what I am using.  I have seen something similar with my geforce4 nvidia settings, it has an option to turn the screen 180 degrees.  I just want it as a stand alone program to learn C++ and what ever else I would need to know hwo to use.

Thanks for your time,

Jase, Thank you for your question.

The desktop is actually displayed in a window, and you can get a handle to that window by calling the GetDesktopWindow function. You can get a Device Context by calling the GetDC function. You can then call any GDI functions, such as GetPixel and SetPixel, to modify the desktop image. Win32 is suprisingly difficult to learn, I advise you to take your time and be very patient.

David Spector


All Answers

Answers by Expert:

Ask Experts


David Spector


Highly knowledgeable in the C++ language, Visual C++ (MSVC), Windows API, documentation and other quality-assurance techniques, and debugging. Knowledgeable in MFC, COM, GUI design, and object-oriented design.


I have been a software engineer since 1965. I have been published. My specializations have been: biomedical programming, compiler implementation, and many kinds of Windows programming. I don't do Databases or other business-oriented stuff.

Windows?/DOS Developer's Journal, ACM SIGPLAN Notices, and Computer Science Press.

ICCP Systems Programming Certification
Master's degree equivalent in Computer Science

©2017 All rights reserved.