个人网站要备案么,wordpress 转换 html,做网站业务员如何跟客户沟通,中心网站建设管理工作用C语言写一个简单的窗口程序#xff0c;目的是生成一个可视化的图形窗口#xff0c;需要用到EasyX库#xff0c;可在文章末尾的网盘链接中下载。该程序退出需左击鼠标#xff0c;否则无法退出。
#includestdio.h
#includestdlib.h
#includewindows.h…用C语言写一个简单的窗口程序目的是生成一个可视化的图形窗口需要用到EasyX库可在文章末尾的网盘链接中下载。该程序退出需左击鼠标否则无法退出。
#includestdio.h
#includestdlib.h
#includewindows.h
#includeconio.h
#includegraphics.h
#includetime.hint flag 1;//标记
int w GetSystemMetrics(SM_CXSCREEN); //屏幕宽
int h GetSystemMetrics(SM_CYSCREEN); //屏幕高void Init()
{HWND hWnd initgraph(w, h);//创建一个图形化窗口// 设置背景色为蓝色setbkcolor(BLUE);// 用背景色清空屏幕cleardevice();SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) - WS_CAPTION);//取消窗口边框// 设置窗口坐标大小 SetWindowPos(hWnd, //窗口句柄HWND_TOPMOST, //是否要设置风格 //2.3 设置窗口不可移动设置窗口不可被覆盖0, 0, //坐标w, h, //大小SWP_SHOWWINDOW); //显示方式
}void evuw()
{settextstyle(45, 40, 黑体);//设置字体打下及格式//打印文字outtextxy(w / 2 - 100, h / 2 - 250, 蓝屏警告);settextstyle(30, 25, 黑体);//设置字体打下及格式outtextxy(w / 2 - 350, h / 2 - 150, 你的电脑遇到不可修复的错误即将关机);outtextxy(0, h / 2 - 100, A problem has been detected and windos has been shut dows to );outtextxy(0, h / 2 - 70, prevent damage to your computer.);outtextxy(0, h / 2 - 30, If this is the first time youve seen this stop error screen,);outtextxy(0, h / 2, restart your computer.If this screen appears again,follow th-);outtextxy(0, h / 2 30, ese steps;);outtextxy(0, h / 2 70, Check to make sure any new hardare or software is properly in-);outtextxy(0, h / 2 100, stalled.If this is a new installation,ask your hardware or s-);outtextxy(0, h / 2 130, oftware manufacturer for any windows updates you might need;);
}int main()
{Init();evuw();while (flag){if (MouseHit()){MOUSEMSG msg GetMouseMsg();if (msg.uMsg WM_LBUTTONDOWN){flag 0;}}}closegraph();//关闭窗口return 0;
}
将生成的可执行文件.exe文件后缀改为.scr,如图点击是即可。 此时文件的类型变为屏幕保护程序将其复制到C:\Windows\SysWOW64下此时会弹出需要管理员权限点击继续即可。
接下来回到桌面右击鼠标选择个性化 选择锁屏界面点击屏幕保护程序设置 在下拉框中找到刚刚复制的屏保程序点击应用后即可此时便设置成功。
EasyX链接 链接https://pan.baidu.com/s/1CTWMbqaATgx663M01vRA5A 提取码2chn