Oh there is a way to make your program run on a certain date/time, on W7 it's under:
Accessories -> System Tools -> Task Scheduler
It's a very useful Windows feature too :D
Also, I'm not yet convinced it's impossible to block ctrl + alt + delete, as soon as ctrl is detected the application can inject another keypress after it, ruining the combination. Another approach is to disable Windows' ability to actually run the alt+tab and ctrl+alt+del routines (maybe in a somewhat malicious way). What happens if you terminate explorer.exe when the user presses ctrl + alt + delete ? IDK, but it sounds fun!
Break out your windows hooks everyone!
http://msdn.microsoft.com/en-us/library/ms632589(v=vs.85).aspx
Note that I just assumed using a keyboard hook won't let you block ctrl + alt + del and alt + tab. I suppose if you can find a way to get your code into the address space of the process that does the ctrl + alt + del stuff then you can crash it, assuming Windows won't let you simply "terminate" it peacefully. But then again I suppose I could be entirely wrong.
Might want to block ctrl + shift + escape too, or better yet, all control keys (alt, control, etc.)
This link has some code and information about locking the desktop: http://www.codeproject.com/KB/winsdk/AntonioWinLock.aspx?df=100&forumid=62485&exp=0&select=1638161 it may be a bit outdated though.
pseudorandom21
Practically a Posting Shark
890 posts since Jan 2011
Reputation Points: 216
Solved Threads: 111
pseudorandom21
Practically a Posting Shark
890 posts since Jan 2011
Reputation Points: 216
Solved Threads: 111
I would re-organize your includes to be (much more neat):
#include<windows.h>
#include<commctrl.h>
#include<conio.h>
#include<cstdlib>
#include<cstdio>
#include<iostream>
#include<string>
#include<vector>
and your entry-point is wrong!! int main(char argc) should be int main(int argc, char *argv[])
I think maybe you should make a function to get the input character-by-character. It makes the code look neater and much easier to modify and extend if you use functional decomposition.
Basically you should read that codeproject article I posted, and be willing to put a little more work into the program, writing a windows hook is really not a difficult task and the other ideas in the article will be a fun learning experience too.
pseudorandom21
Practically a Posting Shark
890 posts since Jan 2011
Reputation Points: 216
Solved Threads: 111