聽(tīng)說(shuō)隱藏這個(gè)窗口需要用C/C++編個(gè)小程序,但我目前只能找到一些作者自己隱藏自己程序控制臺(tái)的例子。這種別人編好的程序我要怎么隱藏它的控制臺(tái),另外這個(gè)控制臺(tái)有什么特殊作用嗎,為什么Emacs作者不把它的控制臺(tái)隱藏。
2 回答

慕俠2389804
TA貢獻(xiàn)1719條經(jīng)驗(yàn) 獲得超6個(gè)贊
#include <stdio.h> #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { int n = 0; printf("show(1) or hide(0)?"); scanf("%d", &n); HWND h = FindWindow(NULL, _T("Command Prompt")); //這里Command Prompt如果不是的話,換成你的標(biāo)題欄上的文字 ShowWindow(h, n); // 0 隱藏,1顯示 return 0; }

烙印99
TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超13個(gè)贊
UINT WINAPI WinExec( __in LPCSTR lpCmdLine, __in UINT uCmdShow ); SHSTDAPI_(HINSTANCE) ShellExecuteW(__in_opt HWND hwnd, __in_opt LPCWSTR lpOperation, __in LPCWSTR lpFile, __in_opt LPCWSTR lpParameters, __in_opt LPCWSTR lpDirectory, __in INT nShowCmd);
都可以控制調(diào)用的控制臺(tái)是否顯示。。
- 2 回答
- 0 關(guān)注
- 1062 瀏覽
添加回答
舉報(bào)
0/150
提交
取消