Disable showing console window

后端 未结 4 2067
栀梦
栀梦 2021-02-04 13:27

Where I can disable in Microsoft-Visual-C++ showing console window?

4条回答
  •  悲&欢浪女
    2021-02-04 13:54

    In your console application, goto

    Properties > Linker > System 
    

    change SubSystem to Windows

    and in your code replace

    int _tmain(int argc, _TCHAR* argv[])
    

    with

    int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
    

    and add

    #include 
    

    This should avoid showing a console window in your console application.

提交回复
热议问题