VisualStudio 中的 Windows GUI 应用程序 [英] Windows GUI applications in VisualStudio

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

问题描述

在 VS 2010 中使用 GUI 编写(希望是原生的)C++ 应用程序的有效方法是什么?

What are the valid ways to write (hopefully native) C++ applications with GUI in VS 2010?

我记得大约 10 年前我使用 MFC,今天有什么大的变化吗?

I remember some 10 years ago I was using MFC, any big changes today?

推荐答案

如果你想继续使用 Native API 那么 MFC 仍然是一个不错的选择,或者普通的 Win32 API.
有一些新控件,例如 VS2010 中引入的功能区控件.有一个 MSDN 上的 VS2010 原生开发教程.如果您使用的是 VS2010,还有许多 C++0x 功能可用于您的本机程序.

If you want to stay with Native API then MFC is still a good choice or plain Win32 API.
There are new controls like the ribbon control introduced in VS2010. There's a tutorial on native development with VS2010 on MSDN. There are also a lot of C++0x features available to your native program if you're using VS2010.

即使您不打算跨平台,Qt 也是另一个不错的选择,但在这种情况下您很可能不会使用 VS 2010.该许可现在可免费用于 LGPL 的商业用途.

Qt is another good choice even if you aren't going cross platform but you won't be using VS 2010 most likely in that case. The licensing is now free for commercial use with LGPL.

如果您打算使用 Microsoft 的 WPF 等较新的框架,则需要使用托管语言 (.NET).另一种选择是适用于 Web 和应用程序的 Silverlight.Silverlight 应用程序的优势在于,如果它们安装了 Silverlight,您甚至可以在 Mac 上运行它们.Winforms 仍然易于编码,但大部分已被 WPF 取代.

If you are going to use a newer framework like WPF from Microsoft then you will need to use a managed language (.NET). Another choice is Silverlight for both web and apps. Silverlight apps have the advantage that you can get them to work even on Mac if they have Silverlight installed. Winforms is still easy to code but mostly superseded by WPF.

除非您有充分的理由这样做,否则您可以使用像 WPF 这样的框架而不是 MFC 来更快地开发.即使您不知道托管语言.(如果您不直接使用 C# 而不是 C++/CLI).WPF 还提供 GPU 加速.

Unless you have good reason to do so, you can develop much faster with a framework like WPF instead of MFC. Even if you don't know a managed language. (If you don't go straight to C# instead of C++/CLI). WPF also offers GPU acceleration.

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

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