On the one hand, Writing a GUI Windows app using the Win32 API is actually not that hard. Each GUI development environment has a learning curve, and once a certain level of triviality is exceeded, they are all as equally easy, or hard, to master.
MFC is very little more than a C++ wrapper around the basic windows concepts. The windows API for example has a HWND - handle to a window, that you can pass to functions like ShowWindow().
MFC has a CWnd that encapsulates an HWND, and has methods, such as Show(). The problem with MFC's wrapping of the underlying API is, well CWnds have different lifespans to the handles they wrap, as well as different restrictions. CWnds are for example not particularly thread safe - whereas its completely safe to access an HWND from many threads (and processes) at the same time.
All that said, if you want a mature c++ development environment thats good for writing GUI apps that can run on MacOS, Windows and Ubuntu: Qt Creator might be worth a try. Its far more independent of the underlying native API than MFC, but I can confirm that projects written in the Qt framework (using Qt Creator) can just be rebuilt to run on MacOS just as easilly as Windows.
Visual Studio提供了非常强大的C++编译器。如果您正在寻找替代方案,英特尔 C++ 编译器可以生成非常快速且紧凑的 exe 文件。
有很多选择。我认为您需要先收集您的规格,然后才能决定如何继续。
First, which programming language are you thinking off ? If your going down the C/C++ road, then you can either write win32 gdi code, use MFC, WTL or a variety of UI toolkits.
Visual studio provides a very powerful C++ compiler. If your looking for an alternative, intel C++ compilers produces very fast and tight exe's.
There are so many choices. I reckon you need to gather your specifications before you can decide how to proceed.
For native Windows development, it's difficult to beat Delphi, whether it's for network, database, multi-tier or (especially) UI intensive applications. The latest version includes specific support for Windows 7, including gestures.
发布评论
评论(4)
对于 C++,您可以使用:
对于UI组件有很多选择:
With C++ you can use:
For UI components there are many options:
我真的不知道如何回答这个问题。
一方面,使用 Win32 API 编写 GUI Windows 应用程序实际上并不难。每个 GUI 开发环境都有一个学习曲线,一旦超过一定程度的简单性,它们都同样容易或难以掌握。
MFC 只不过是围绕基本 Windows 概念的 C++ 包装器。例如,Windows API 有一个 HWND - 窗口句柄,您可以将其传递给 ShowWindow() 等函数。
MFC 有一个封装了 HWND 的 CWnd,并且有一些方法,例如 Show()。 MFC 包装底层 API 的问题是,CWnd 对其包装的句柄具有不同的生命周期,以及不同的限制。例如,CWnd 并不是特别线程安全 - 而同时从多个线程(和进程)访问 HWND 是完全安全的。
话虽如此,如果您想要一个成熟的 C++ 开发环境,该环境适合编写可以在 MacOS、Windows 和 Ubuntu 上运行的 GUI 应用程序: Qt Creator 可能值得一试。它比 MFC 更加独立于底层本机 API,但我可以确认用 Qt 框架(使用 Qt Creator)编写的项目可以重新构建以在 MacOS 上运行,就像在 Windows 上一样轻松。
I am really unsure how to answer this question.
On the one hand, Writing a GUI Windows app using the Win32 API is actually not that hard. Each GUI development environment has a learning curve, and once a certain level of triviality is exceeded, they are all as equally easy, or hard, to master.
MFC is very little more than a C++ wrapper around the basic windows concepts. The windows API for example has a HWND - handle to a window, that you can pass to functions like ShowWindow().
MFC has a CWnd that encapsulates an HWND, and has methods, such as Show(). The problem with MFC's wrapping of the underlying API is, well CWnds have different lifespans to the handles they wrap, as well as different restrictions. CWnds are for example not particularly thread safe - whereas its completely safe to access an HWND from many threads (and processes) at the same time.
All that said, if you want a mature c++ development environment thats good for writing GUI apps that can run on MacOS, Windows and Ubuntu: Qt Creator might be worth a try. Its far more independent of the underlying native API than MFC, but I can confirm that projects written in the Qt framework (using Qt Creator) can just be rebuilt to run on MacOS just as easilly as Windows.
首先,您正在考虑哪种编程语言?如果您走 C/C++ 道路,那么您可以编写 win32 gdi 代码、使用 MFC、WTL 或各种 UI 工具包。
Visual Studio提供了非常强大的C++编译器。如果您正在寻找替代方案,英特尔 C++ 编译器可以生成非常快速且紧凑的 exe 文件。
有很多选择。我认为您需要先收集您的规格,然后才能决定如何继续。
First, which programming language are you thinking off ? If your going down the C/C++ road, then you can either write win32 gdi code, use MFC, WTL or a variety of UI toolkits.
Visual studio provides a very powerful C++ compiler. If your looking for an alternative, intel C++ compilers produces very fast and tight exe's.
There are so many choices. I reckon you need to gather your specifications before you can decide how to proceed.
对于本机 Windows 开发,很难击败 Delphi,无论是网络、数据库、多层还是(尤其是) UI 密集型应用程序。最新版本包括对 Windows 7 的特定支持,包括手势。
请参阅审阅者指南了解更多详细信息。
For native Windows development, it's difficult to beat Delphi, whether it's for network, database, multi-tier or (especially) UI intensive applications. The latest version includes specific support for Windows 7, including gestures.
Take a look at the Reviewer's Guide for more details.