如何使用C ++为Windows应用程序创建GUI? [英] How do I create a GUI for a windows application using C++?

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

问题描述

我决定如何为一个小的c ++ / win32 api项目(工作Visual Studio C ++ 2008)开发一个GUI。该项目只需要几个组件来启动主进程,所以它将非常轻的重量(只有1个按钮和一个文本框几乎...)。我的问题是这样:

I am deciding on how to develop a GUI for a small c++/win32 api project (working Visual Studio C++ 2008). The project will only need a few components to start off the main process so it will be very light weight (just 1 button and a text box pretty much...). My question is this:

我没有在Windows上开发GUI的经验,但我可以轻松学习。那么,我应该使用什么?一个可视化编辑器(拖放代码生成g:我偏好桌面GUI设计far(java / swing))。还是应该使用专门的图书馆?无论哪种方式,我应该使用WHICH库还是可视化编辑器?我听说有人提到在C#中编写GUI,然后调用C ++代码...事情是,这是一个简单的GUI,我会发现它更容易保持它的所有在C + +,但我打开任何最好的建议是。

I don't have experience developing GUIs on windows but I can learn easily. So, what should I use? A Visual editor (drag and drop code generationg: my preference for desktop GUI designing by far (java/swing)). Or should I use a speicific library? Either way, WHICH library or visual editor should I use? I heard someone mention writing the GUI in C#, then calling the C++ code... the thing is, that this is such a simple GUI I would find it easier to just keep it all in C++, but I'm open to whatever the best suggestion is.

推荐答案

如果你做一个非常简单的GUI并且已经使用Visual Studio,感觉只是去与MFC。您可以使用Visual Studio MFC向导来创建一个基于对话框的应用程序,将两个控件放在它上面,然后离开。

If you're doing a very simple GUI and you're already using Visual Studio then it may make sense to just go with MFC. You can just use the Visual Studio MFC wizard to create a dialog based application, drop two controls on it and away you go.

MFC已过期,麻烦,但如果你只是说一个按钮和一个文本框,它肯定会为你的工作。

MFC is dated and has its fair share of annoyances, but it will certainly do the job for you if you're just talking about a button and a text box.

我没有任何经验Qt,所以我不能比较两者。

I don't have any experience with Qt, so I can't compare the two.

这篇关于如何使用C ++为Windows应用程序创建GUI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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