Hey so for a couple of months now Ive been facinated with c++ and have been going through various tutorials and examples of creating console based applications dealing with arrays,pointers, classes, etc.So I really want to get into the GUI side of it. But from word of mouth I hear that c++ GUI implementation can be much diffciult than say java (which I have mainly been doing).
Recently I have been going through the win32 API and doing some examples from an e-book called ForgersWin32- tutorial.(I was eclipse with MinGW compiler and on windows platform)
So I was wondering if like java...there are alternative libraries I could use other than the win32 ?? And also if you could point out some good further reading materials that might help me out.

Thanks appreciate the help

Recommended Answers

All 2 Replies

There are several higher-level c++ alternatives, such as C#, Windows Forms (which is CLI/C++), MFC, wxWindows, QT (cross-platform) just to mention a few. C#, WF, and MFC you will want to use Microsoft's VC++ 20?? compiler/IDE.

commented: Thanks I know but I would prefer learning more of the lower level aspects and making it work to my needs , Ive looked at c# and it seems much simpler and less tedious....however I more interested in accomplishing my goals in C++ +0

As AD said, there are many alternatives. Doing Win32 API directly is probably the worst option. In a similar style as doing Win32 API directly, you can use SDL, which is at least cross-platform and a bit easier, but still very basic and low-level like Win32 API. On the Microsoft side, one option is MFC, but it is old and is being deprecated by MS (which I think is a good thing, because MFC sucked), and then, there is WinForm (Windows Forms) which is better than MFC but WinForms is basically another name for the GUI part of the .NET platform, meaning you have to use C++/CLI (a hybrid language between C++ and C#) or a .NET-only language (like C#), so you basically have to learn a new language to use it (and the hybridization in C++/CLI is a bit quirky). So, there is no current, decent GUI toolkit in pure C++ offered by Microsoft right now (or there never was, depending on whether you consider MFC to be decent or not). A common practice is to compile the important C++ code into a DLL and call it from the GUI written in another language.

Outside the MS world, there a much nicer alternatives in C++, IMHO. wxWidgets is a popular one, but I have never used it. Ditto for GTK+. Qt is definitely what I recommend, it is cross-platform, easy and intuitive, and all object-oriented, and comes with a pretty complete toolset (and Qt code also plays nice with any other code or external libraries). Another one that I always found to be way beyond any other in terms of quality and ease of development is VCL/CLX (which is the precursor of the .NET platform, which I don't think is an improvement over the VCL), but it is rather old now and it requires that you use the Borland compiler (C++Builder) in order to be compatible with the VCL library (natively a Delphi library, but compatible with all Borland compilers, because they have the same back-end).

The path of least resistance for you, I think, would be to just install QtCreator and start going through some tutorials. It'll get you moving quickly, without too much hassle. When I had a GUI project some years ago, I thought I could try out Qt (for the first time) for that project (rather small, 1 main window displaying images, a few custom dialogs, a few menu tabs, and a background "worker" thread). About 2 hours passed from the time I installed Qt until the time I was done with the project (including going through a few tutorials before starting the project). Of course, I have done a lot of GUIs before in other frameworks, so, your mileage may differ, but it was surprisingly quick and easy for me. Even with my experience and scrutiny in C++, I haven't found anything in what I have seen and used of Qt libraries that didn't please me, and so, I wouldn't consider using anything else now.

commented: Thanks btw QtCreator works with what compiler ?? +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.