在cb里运行程序时会跳出控制台来
sdlgui吧
全部回复
仅看楼主
level 11
闪光点22的xh
楼主
这样好奇怪,也不好看,该怎么隐藏控制台呢
@twtfcu3
@一周休七天@DXkite
@啊o额iu鱼
@TTHHR
2014年05月31日 05点05分
1
level 9
啊o额iu鱼
额额,没用过……
2014年05月31日 05点05分
2
闪光点22的xh
手机打在不怎么快,一般用电脑,空闲时用手机
2014年05月31日 05点05分
level 11
闪光点22的xh
楼主
刚刚查了一下:
有以下几种方法:
1.加入
#pragma comment( lib,"User32")
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
2.主函数由int main()改成int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow)
2014年05月31日 05点05分
3
twtfcu3
用main是一定会出现一个黑窗口的,不过你可以人为的隐藏它
2014年05月31日 06点05分
TTHHR
回复 twtfcu3 :这个没试过,不过见过这种情况
2014年05月31日 06点05分
闪光点22的xh
回复 twtfcu3 :我先试试
2014年05月31日 11点05分
level 11
闪光点22的xh
楼主
亲测有用:
HWND hwnd;
hwnd=FindWindow("ConsoleWindowClass",NULL);
if(hwnd)
{
ShowOwnedPopups(hwnd,SW_HIDE);
ShowWindow(hwnd,SW_HIDE);
}
@twtfcu3
2014年05月31日 11点05分
4
闪光点22的xh
插入程序最前。
2014年05月31日 11点05分
twtfcu3
回复 闪光点22的xh :先打开多个cmd窗口后再打开你的程序试试
2014年05月31日 11点05分
level 1
o0狙击手v
难道你们不是这样配置的么?
2014年06月04日 12点06分
5
1