控制台窗口隐藏

来源:互联网 发布:商业公司的顶级域名是 编辑:程序博客网 时间:2024/05/18 22:54


HWND hwnd = GetConsoleWindow();DWORD dwExStyle = GetWindowLong(hwnd,GWL_STYLE);dwExStyle &= ~(WS_VISIBLE);dwExStyle |= WS_EX_TOOLWINDOW;dwExStyle &= ~(WS_EX_APPWINDOW);SetWindowLong(hwnd,GWL_STYLE,dwExStyle);ShowWindow(hwnd,SW_SHOW);ShowWindow(hwnd,SW_HIDE);UpdateWindow(hwnd);


调用了windows api
0 0