Hide cmd windows in MFC console program

1
2
3
4
5
#ifdef UNICODE
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"wmainCRTStartup\"")
#else
#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
#endif

In unicode environment the entry point is wmainCRTStartup.
MFC use wmainCRTStartup to start program’s main, the linker subsystem
can choose CONSOLE|WINDOWS|NATIVE|POSIX, if settle WINDOWS mean no console.

TIM20180803095930.jpg
TIM20180803095930.jpg

https://blog.csdn.net/mdcire/article/details/53456673
https://blog.csdn.net/wenhao_ir/article/details/50897312