本版
查看: 7918|回复: 12

蓝屏小软件(C++)

[复制链接]

Super Moderator

实习版主

9#
发表于 2021-10-31 07:06:42 | 只看该作者 |只看大图 |倒序浏览 |阅读模式
又见楼主新作品。
兴趣不减,新作不断

[Lv.5]胡萝卜

喜欢Python的小渣渣

10#
 楼主| 发表于 2021-10-31 14:59:29 | 只看该作者
cmd 发表于 2021-10-30 16:16
有源码吗mmmmmmmmmmm

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

    using namespace std;

    void full_screen() {
    HWND hwnd = GetForegroundWindow();
    int cx = GetSystemMetrics(SM_CXSCREEN);
    int cy = GetSystemMetrics(SM_CYSCREEN);

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

    if(GetConsoleCursorInfo(hStdOut, &cciCursor)) {
    cciCursor.bVisible = FALSE;
    SetConsoleCursorInfo(hStdOut, &cciCursor);
    }
    }

    int main()
    {
    system("mode 96,28");
    HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
    DWORD mode;
    GetConsoleMode(hStdin, &mode);
    mode &= ~ENABLE_QUICK_EDIT_MODE;
    SetConsoleMode(hStdin, mode);
    HideTheCursor();
    CONSOLE_FONT_INFOEX cfi;
    cfi.cbSize = sizeof cfi;
    cfi.nFont = 0;
    cfi.dwFontSize.X = 15;
    cfi.dwFontSize.Y = 30;
    cfi.FontFamily = FF_DONTCARE;
    cfi.FontWeight = FW_NORMAL;
    wcscpy(cfi.FaceName, L"MS Gothic");
    SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi);
    system("color 1f");
    RECT rect;
    HWND hwnd=GetForegroundWindow();
    GetWindowRect(hwnd,&rect);
    MoveWindow(hwnd,-30,-7,8600,1080,TRUE);
    full_screen();
    cout<<"A problem has been detected and windows has been shut\
    down to prevent damage\n\
    to your computer.\n\n\
    DRIVER_IROL_NOT_LESS_OR_EQUAL\n\n\
    If this is the first time you've seen this Stop error screen, \n\
    restart your computer.If this screen appears again, follow \n\
    these steps:\n\n\
    Check to make sure any new hardware or software is properly installed.\n\
    If this is a new installation, ask your hardware or software manufacturer\n\
    for any windows updates you might need.\n\n\
    If problems continue. disable or remove any newly installed hardware\n\
    or software. Disable BIOS memory option such as caching or shadowing.\n\
    If you need to nsu Safe Mode to remove or disable components, restart\n\
    your computer, press F8 to select Advanced Startup Options, and then\n\
    select Safe Mode.\n\n\
    Technical information:\n\
    \"\"\"STOP:0x0000007B(0xFD3094c2,0x00000001,0xFBFE7617,0x00000000)\n\n\
    \"\"\"SPCMDON.SYS - Address FBFE7617 base at FBFE5000, DateStamp 3d6dd67c"<<endl;
    while(true)
    {
    HideTheCursor();
    Sleep(1000);
    }
    return 0;
    }

[Lv.5]胡萝卜

喜欢Python的小渣渣

11#
 楼主| 发表于 2021-10-31 15:02:14 | 只看该作者
可以粘贴到C++里面

[Lv.5]胡萝卜

喜欢Python的小渣渣

12#
 楼主| 发表于 2021-11-5 11:11:41 | 只看该作者
忘了叮嘱一声,此软件只支持Windows10系统。。。。。。。。。。。。。。。。。。。

Super Moderator

实习版主

13#
发表于 2021-11-5 11:33:10 | 只看该作者
我记得非常早以前就有模拟蓝屏的小工具,还有个蓝屏的屏保,很意思。

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

GMT+8, 2026-10-19 23:29 , Processed in 0.07 second(s), 20 queries , Gzip On.

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