将控制台应用程序转换为Windows应用程序 [英] convert a console app to a windows app

查看:573
本文介绍了将控制台应用程序转换为Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(它的一个长的故事),但我有一个大的复杂项目文件包含一个Windows程序。不幸的是,该项目最初构建为控制台应用程序。程序编译和链接确定,但是当运行引起一个控制台,而不是我希望的窗口的集合。我看着命令行,看到/ SUBSYSTEM:CONSOLE,而它应该是/ SUBSYSTEM:WINDOWS。我不知道如何更改命令行。

(its a long story) but I have a large complex project file containing a windows program. Unfortunately the project was originally built as a console app. The program compiles and links ok but when runs brings up a console instead of the collection of windows I was hoping for. I looked at the command line and saw "/SUBSYSTEM:CONSOLE" whereas it should be "/SUBSYSTEM:WINDOWS". I have no idea how to change the command line. Is there some box I can tick in the project setting somewhere to make this change?

推荐答案

右键单击项目,属性,链接器,系统,更改子系统设置。你还必须将main()方法更改为WinMain()。你最好创建一些窗口,或者看不到很多东西。

Right-click the project, Properties, Linker, System, change the SubSystem setting. You'll also have to change your main() method to WinMain(). And you'd better create some windows or there won't be much to look at.

这篇关于将控制台应用程序转换为Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆