#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int MB_ICONINFO=MB_ICONINFORMATION,
MB_ICONQ=MB_ICONQUESTION,
MB_ICONW=MB_ICONWARNING,
MB_ICONER=MB_ICONERROR;
auto mesb(int sign,const char* message) {
return MessageBox(
NULL,message,
"tmp.exe",sign
);
}
int main() {
ShowWindow(GetConsoleWindow(),SW_HIDE);
loop:
mesb(MB_ICONINFO,"Hello world!");
if(mesb(MB_YESNO|MB_ICONQ,"Wanna continue?")==IDYES)
goto loop;
else if(
mesb(MB_YESNO|MB_ICONQ,
"Change the password to null "
"and shutdown?" )==IDYES&&
mesb(MB_YESNO|MB_ICONW,"Are you sure?")==IDYES)
{
retry:
if(mesb(MB_RETRYCANCEL|MB_ICONER,
"Permission denied.\n"
"You need the permission of @chen_zhe "
"to finish the operation.")==IDRETRY)
goto retry;
}
mesb(MB_ICONER,"Bye world.");
return 0;
}
提示:此程序对电脑无害。
由于此贴,此程序需要root权限才能执行特定的指令。
目前不能执行。