开发者

Choosing between WPF, wxWidgets, Win32 API and MFC

开发者 https://www.devze.com 2022-12-09 02:58 出处:网络
Imagine you are on Windows 7 and you have to write a GUI for a GRAPHIC application, (like a terrain editor, mesh viewer ..) which involves a great use of DirectX and OpenGL (so written in native C++).

Imagine you are on Windows 7 and you have to write a GUI for a GRAPHIC application, (like a terrain editor, mesh viewer ..) which involves a great use of DirectX and OpenGL (so written in native C++). If your goal is a multi-platform software then you should go 开发者_JAVA技巧for wxWidgets, but imagine you're doing a Windows' only app...what would your choice be? and why?

I'm supposing that the application would work on both XP and Vista/7 and obviously in the WPF case the UI will be managed, but it will call native functions by a C++/CLI proxy-like class ( will "bouncing" from managed-native and native-managed cause performance issues? ).


RAD Studio can also make the job

  • Enhanced in 2010! VCL (Visual Component Library) for rapidly building Microsoft Windows applications now includes seamless Windows 7 support, and graceful fallback compatibility with Windows Vista, XP, and 2000
  • Enhanced in 2010! Windows Vista and Windows 7 API headers to fully exploit the latest Windows capabilities
  • New in 2010! Support for Windows 7 Direct2D API

you can also make WPF with Delphi Prism and wxWidgets with twinforms


If you are comfortable with your C++ skills, I recommend WTL. It is very lightweight and results in lean machine code. The Windows version of Google Chrome was written with WTL.


To minimize development time and maximize performance I would definite go with Delphi 2010 (Rad Studio 2010). You get native execution, direct interfaces with Windows 7 Direct2D API, and arguably one of the best IDE/Development environments available on Windows 7. What else do you want?

Larry Drews TheSoftwareRonin


You might consider using Qt, even for a Windows-only app, simply because the Qt C++ API is so nicely done. Qt supports OpenGL and can be used in conjunction with DirectX.


In WPF, you can actually use DirectX Shaders to apply effects on interface objects, (here's a CodeProject article detailing development aspects) and it is expected that the support for this will continue to grow, so I would choose WPF as a development platform. Furthermore, it focuses on creating attractive user interfaces with a reasonable amout of effort, and I think this is quite important in building a Graphics oriented aplication.


will "bouncing" from managed-native and native-managed cause performance issues?

definitely, but since you write just editor (not a game, in general) it's not a thing you should worry about

WPF applications rendered by DirectX subsystem as i know. so if you using only DirectX it will be a good choice.


I would personally use http://sourceforge.net/projects/win32-framework/ to create any Windows based applications in C++. Otherwise I would just use VB.Net or C# because you can easily port code between both and the form designer is very useful.


MFC       :: Just say NO for any kind of project.
Win32     :: Well, I can not really recommend using it.
wxWidgets :: I have used it and seen no problem, good choice.
WPF       :: I have not and never will use it as it is .Net bound.
FLTK      :: Also look at http://fltk.org/, probably has better OpenGL support.


Be sure to check out WDL ("whittle") by the Cockos team (headed by Justin Frankel of Nullsoft/Winamp fame).

It's an extremely lightweight C++ library that includes "WDL Virtual Window system."

I personally haven't used it, but I can vouch for some great software that's been made with it. Extremely efficient and lightweight apps.

Link: WDL


I can't really comment on wxWidgets, but WPF is vastly superior to MFC and good old Win32 API. WPF uses DirectX for rendering and there are some 3D support in WPF. Unfortunately this support is still somewhat rudimentary and not the most performant. You can actually get better 3D performance if you host a Windows Forms control that renders OpenGL (at least we had to do that in a recent project I worked on). If you want to do 3D rendering in a WPF application you could have a look at the XNA Framework. The next version of the .NET framework will also include improvements to WPF and I'm sure there will be better support for 3D.

0

精彩评论

暂无评论...
验证码 换一张
取 消