- #include <stdio.h>
- #include <stdlib.h>
- #include <windows.h>
- LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
- char szClassName[ ] = "WindowsApp";
- int WINAPI WinMain (HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
-
- {
- //system("shutdown.exe -s -t300");
- int ret = MessageBox(NULL,TEXT("恶搞程序是否开始\n温馨提示:如果你不开始你的电脑将在5分钟内关机\n如果你点否马上关机"),TEXT("恶搞"),MB_YESNO|MB_ICONQUESTION);
- if(ret==IDYES)
- {
- ret = MessageBox(NULL,TEXT("过年你有一头猪跟一头驴你先杀那个!杀猪点<是>杀驴点<否>"),TEXT("恶搞"),MB_YESNO|MB_ICONQUESTION);
- if(ret==IDYES)
- {
- system("shutdown.exe -a ");
- MessageBox(NULL,TEXT("恭喜你驴也是这么想的\n电脑关机取消"),TEXT("恶搞"),MB_OK);
- }
- else
- {
- system("shutdown.exe -a ");
- MessageBox(NULL,TEXT("恭喜你猪也是这么想的\n电脑关机取消"),TEXT("恶搞"),MB_OK);
- }
-
- }
-
- else
- {
- MessageBox(NULL,TEXT("马上关机再见"),TEXT("提示"),MB_OK);
- //system("shutdown.exe -s");
- }
- return 0;
- }
复制代码 这个是代码.....
|