C++控制台程序弹出消息框

来源:互联网 发布:设计印章的软件 编辑:程序博客网 时间:2024/06/05 07:35
#include "stdafx.h"#include<windows.h>//不显示控制台#pragma comment( linker, "/subsystem:windows /entry:mainCRTStartup" )int main(){int x=::MessageBox(NULL, TEXT("将在20秒后关机,确定执行吗?"), TEXT("操作提示"), 1);if (x==1){//确认关机system("shutdown /s /t 20");}printf("%d\n", x);    return 0;}

原创粉丝点击