C++应用如何取消黑色命令行?

方案1:

int main()
{
    ShowWindow (GetConsoleWindow(), SW_HIDE);
// do something
}

方案2:

void Stealth()
{
    HWND Stealth;
    AllocConsole();
    Stealth = FindWindowA("ConsoleWindowClass", NULL);
    ShowWindow(Stealth,0);
}

int main()
{

Stealth();

// do something

}

===========

对问题的抽象和总结:

1、C++ 不显示黑框

2、控制台程序不显示dos窗口的方法

3、C++ application disable the dos window

4、C++ exe do not showing the black window

posted @ 2022-03-28 00:04  bH1pJ  阅读(69)  评论(0编辑  收藏  举报