搜索
楼主: 电脑时间

蓝屏小软件(C++)

[复制链接]
发表于 2021-10-31 07:06:42 | 显示全部楼层
又见楼主新作品。
兴趣不减,新作不断
回复

使用道具 举报

 楼主| 发表于 2021-10-31 14:59:29 | 显示全部楼层
cmd 发表于 2021-10-30 16:16
有源码吗mmmmmmmmmmm

有。
  1. #include <iostream>
  2. #include <windows.h>

  3. using namespace std;

  4. void full_screen() {
  5.         HWND hwnd = GetForegroundWindow();
  6.         int cx = GetSystemMetrics(SM_CXSCREEN);
  7.         int cy = GetSystemMetrics(SM_CYSCREEN);

  8.         LONG l_WinStyle = GetWindowLong(hwnd,GWL_STYLE);   //获取窗口信息
  9.         SetWindowLong(hwnd,GWL_STYLE,
  10.                       (l_WinStyle | WS_POPUP | WS_MAXIMIZE) & ~WS_CAPTION & ~WS_THICKFRAME &
  11.                       ~WS_BORDER);
  12.         SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, 0);
  13. }
  14. void HideTheCursor() {
  15.         CONSOLE_CURSOR_INFO cciCursor;
  16.         HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);

  17.         if(GetConsoleCursorInfo(hStdOut, &cciCursor)) {
  18.                 cciCursor.bVisible = FALSE;
  19.                 SetConsoleCursorInfo(hStdOut, &cciCursor);
  20.         }
  21. }

  22. int main()
  23. {
  24.         system("mode 96,28");
  25.         HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
  26.         DWORD mode;
  27.         GetConsoleMode(hStdin, &mode);
  28.         mode &= ~ENABLE_QUICK_EDIT_MODE;
  29.         SetConsoleMode(hStdin, mode);
  30.         HideTheCursor();
  31.         CONSOLE_FONT_INFOEX cfi;
  32.         cfi.cbSize = sizeof cfi;
  33.         cfi.nFont = 0;
  34.         cfi.dwFontSize.X = 15;
  35.         cfi.dwFontSize.Y = 30;
  36.         cfi.FontFamily = FF_DONTCARE;
  37.         cfi.FontWeight = FW_NORMAL;
  38.         wcscpy(cfi.FaceName, L"MS Gothic");
  39.         SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi);
  40.         system("color 1f");
  41.         RECT rect;
  42.         HWND hwnd=GetForegroundWindow();
  43.         GetWindowRect(hwnd,&rect);
  44.         MoveWindow(hwnd,-30,-7,8600,1080,TRUE);
  45.         full_screen();
  46.         cout<<"A problem has been detected and windows has been shut\
  47. down to prevent damage\n\
  48. to your computer.\n\n\
  49. DRIVER_IROL_NOT_LESS_OR_EQUAL\n\n\
  50. If this is the first time you've seen this Stop error screen, \n\
  51. restart your computer.If this screen appears again, follow \n\
  52. these steps:\n\n\
  53. Check to make sure any new hardware or software is properly installed.\n\
  54. If this is a new installation, ask your hardware or software manufacturer\n\
  55. for any windows updates you might need.\n\n\
  56. If problems continue. disable or remove any newly installed hardware\n\
  57. or software. Disable BIOS memory option such as caching or shadowing.\n\
  58. If you need to nsu Safe Mode to remove or disable components, restart\n\
  59. your computer, press F8 to select Advanced Startup Options, and then\n\
  60. select Safe Mode.\n\n\
  61. Technical information:\n\
  62. """STOP:0x0000007B(0xFD3094c2,0x00000001,0xFBFE7617,0x00000000)\n\n\
  63. """SPCMDON.SYS - Address FBFE7617 base at FBFE5000, DateStamp 3d6dd67c"<<endl;
  64.         while(true)
  65.     {
  66.                 HideTheCursor();
  67.                 Sleep(1000);
  68.         }
  69.         return 0;
  70. }
复制代码
回复

使用道具 举报

 楼主| 发表于 2021-10-31 15:02:14 | 显示全部楼层
可以粘贴到C++里面
回复

使用道具 举报

 楼主| 发表于 2021-11-5 11:11:41 | 显示全部楼层
忘了叮嘱一声,此软件只支持Windows10系统。。。。。。。。。。。。。。。。。。。
回复

使用道具 举报

发表于 2021-11-5 11:33:10 | 显示全部楼层
我记得非常早以前就有模拟蓝屏的小工具,还有个蓝屏的屏保,很意思。
回复

使用道具 举报

联系我们(Contact)|手机版|萝卜头IT论坛 ( 苏ICP备15050961号-1 )

GMT+8, 2024-12-21 23:34 , Processed in 0.076644 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表