Convert a console project into a Win32 GUI project or the other way around.
来源:互联网 发布:java 经典项目开发案例 编辑:程序博客网 时间:2024/06/01 09:31
Jeffrey Richter mentioned in his classical Programming application for Windows, 4th edition that if a developer made a mistake by creating a Win32 project when what he really meant was a Console project, he has at least the following 2 options to fix it. (Jeffery Richter mentioned 4 options actually. But the first 2 are not interesting at all.)
- Click on the Link tab of the Project Settings dialog box and change the /SUBSYSTEM:WINDOWS switch to /SUBSYSTEM :CONSOLE. This is an easy way to fix the problem; few people are aware that this is all they have to do.
- Click on the Link tab of the Project Settings dialog box and delete the /SUBSYSTEM:WINDOWS switch entirely. This is my favorite choice because it gives you the most flexibility. Now, the linker will simply do the right thing based on which function you implement in your source code. I have no idea why this isn't the default when you create a new Win32 Application or Win32 Console Application project with Visual C++'s Developer Studio.
Reader may come to the conclusion that the project type, or consequently the application type, is determined by the entry point function name you choose. If you use main(), you'll get a console project and get an console application in the end, if you choose WinMain(), you'll get a Win32 project and a Win32 application in the end.
Not necessarily. The above statement is only true when the /ENTRY option is not used for the linker. With this option, you can specify any function name as the Entry Point Function of your application. If you do so, whether your application will be a console application or a Win32 application will be solely determined by the /SUBSYSTEM option.
This means, it's completely OK to have a GUI application that starts with a main() function. It's also completely OK to have a console application that starts with a WinMain() function. Name doesn't matter!
- Convert a console project into a Win32 GUI project or the other way around.
- Convert a Maven Java Project to a Web Project
- Create a Progress Bar with Win32 project
- The project is not a myEclipse hibernate project
- The project is not a myEclipse hibernate project
- Initiate a maven project inside the svn project
- The project is not a myEclipse hibernate project
- The project is not a myEclipse hibernate Project
- The project is not a myEclipse hibernate project
- The given project is not a virtual component project
- The given project is not a virtual component project
- The given project is not a virtual component project
- How to import a static library into your test project?
- The JACOB Project: A JAva-COM Bridge
- Changing the sharing of a project
- The story of a typical software project.
- note : a demo test gdi operation on win32 project
- How to skip other publishable projects during publish a clickonce project in a solution?
- OpenWrt编译过程
- c/c++在windows下获取时间和计算时间差的几种方法总结
- Unix[IBM/AIX|集群情况]下Oralce10g常用维护命令
- js 精确计算
- Field 'id' doesn't have a default value问题解决方法
- Convert a console project into a Win32 GUI project or the other way around.
- 两个(Unix/AIX下)ksh日志显示和维护脚本
- MongoDB: Database Profiler
- ORACLE JOB 设置
- C程序:如何判断链表是否有环
- dojo 与ext 优缺点
- 在繁体系统编的VBA程序,在简体系统打开中文字体全是乱码,请问该怎么解决?
- hdu 1277 全文检索 ac 自动机
- 增加工具条提示功能(每天都坚持)