views:

690

answers:

4

There are pretty many questions regarding C++ GUI toolkits for Windows, but they mostly apply to desktop OS versions.

I'm now starting a C++ project for Windows CE 5.0 VGA hand-held device, and thinking about what GUI library to choose. I have some experience using MFC in Windows CE projects, but there are some known weak points of MFC mentioned here at SO (e.g., pretty outdated technologies used, bad abstraction, overuse of C++ preprocessor, etc.). For desktop projects they recommend QT and WTL mostly. At the same time MFC has some characteristics to be still considerable for embedded development.

So, how do you think, is it reasonable to spent some resources learning new GUI toolkit to switch from MFC, and what toolkit would you recommend in this case? Or is MFC still the most considerable for Windows CE embedded development?

The most important characteristics of a toolkit are: moderate CPU and memory load, small runtime size, good object-oriented design, compliance with good modern C++ practices, steep learning curve, development speed, commercial look, handy debug and design tools.

(What is needed in the project: serial port communication, threads, plots and diagrams drawing, ActiveSync communication.)

+1  A: 

If you learn QT, you'll be well placed to write code for all the other (Linux) platforms that are being pushed by the lines of Nokia, Intel and Google. That in itself makes it the most appropriate technology for me!

You may still have to look to other libraries for some of the other aspects of your code, but using QT for the GUI is never going to be a bad choice.

gbjbaanb
unless you don't wanna share the source code
ZeroCool
You don't need to share the source code by QT commercial license.LGPL QT license only obliges you to share changes to Qt source code.
Alex Che
Not only Linux platforms, Symbian too.
e8johan
+2  A: 

First advantage is that QT is a cross-platform lib. Secondly, MFC is an headache. The simplest things to do with MFC may turn to a big problem . So move from MFC to the QT as soon as it is possible.

Narek
+1  A: 

If you know MFC then stick with it: it works fine for CE. There are of course some restrictions compared to Desktop MFC, but they are generally not significant. I think the main issue we have found is that printing isn't supported in MFC8 for CE (VS2005).

On the other hand if you have a blank canvas I'd recommend going for .NET -- either C# or VB, whichever you feel most comfortable with.

AAT
If you don't have memory contraints then C# is your quickest TTM. Very easy for most embedded applications but the compact framework is a massive memory hog. There are also some very annoying omissions in the CF esp if you come from a C#-desktop background.
EndsOfInvention
@EndsOfInvention: agreed, coming from a .NET desktop environment the Compact Framework has a lot more missing relative to full .NET than MFC CE has relative to Desktop MFC.
AAT
+4  A: 

We have Qt 4.5 on Windows CE 5.0 project at finishing stage, so I try to tell about advantages / disadvantages of Qt developing comparing to MFC.
Qt Pluses:

  • Nice OOP design
  • Natively supported signals/slots abstraction allows develop more rapidly and easily
  • Qt supports many various features (GUI, filesystem, networking, threading, etc)
  • LGPL license allows develop commercial application for free
  • Open sourcecodes, examples, excellent documentation makes learning curve much, much stepper
  • Multiplatform library. We was able to run our application on device and desktop with Vista OS without any trouble. In 4.6 version Symbian support has been added

Qt minuses:

  • Pretty big binaries ( > 10 Mb for Core and Gui module with all features "on", but you can tweak library building and make libs smaller)
  • Big memory and CPU usage comparing to MFC

I think, that main advantage of MFC comparing to Qt it its minimal memory and CPU footprint. If this is not issue - choose Qt.
P.S. Com port communication and plot drawing not natively included in Qt, but LGPL Qt-based libraries exist, which give you such features (As example "Qwt" for plotting).

vnm