Does anyone have any idea how I can do this in C++?
C++ has no built-in facilities to do this. What you want is to call various functions provided by your OS to perform these tasks.
You need to specify the operating system, and then either post the information here, or if it's Windows, go to one of the Windows-related C++ forums (Visual C++, the WinAPI forum, etc.)
Bookmarks