Hi,
Is there a way one can create a Graphical user interface in C++, and include things like Radio buttons,Check Boxes e.t.c in one's application.

Thanks alot

Recommended Answers

All 7 Replies

Yes, there is. Not with just built in C++, as far as I know, but using Qt4, as I do, you can. You can also use Tcl/Tk with C++ (I think...). With the book "C++ GUI Programming With Qt4" by Jasmin Blanchette and Mark Summerfield.

If on the MS-Windows os you can use win32 api functions or any of several other gui libraries such as xwindows. All of these require solid underatanding of C or C++ languages.

If you run a *nix you can use GTK or QT.

Yes, there is. Not with just built in C++, as far as I know, but using Qt4, as I do, you can. You can also use Tcl/Tk with C++ (I think...). With the book "C++ GUI Programming With Qt4" by Jasmin Blanchette and Mark Summerfield.

Excellent book, plus with QT you will be able to write code that will compile both on windows and on linux!!{also QT is a great framework you can find inside functions that will do anything!!}

If on the MS-Windows os you can use win32 api functions or any of several other gui libraries such as xwindows. All of these require solid underatanding of C or C++ languages.

Also you can try VC++{ with mfc} and VC++.NET /CLI {with winforms}

My answer is MANY.

There are many API's for making GUI applications.

1. WinAPI:
Its a great API and the best solution if you are windows programmer. First code will look a bit difficult, but later (after making few apps.) you will see its not so rusty. I like it, because you can do almost everything with it (in windows). The only bad thing is, that you cannot make applications for Linux with it.
Tutorial:
http://www.winprog.org/tutorial/index.html
2. Qt4 / Qt3
This is a nice API, for making GUI applications. It works under Linux, Windows and Mac OS X. Its really easy to learn and use. But, until you dont buy licenced version, you will need to add tons of -dll s, to run your application. Qt compiler doesnt work in Vista. And, Qt4 API has a bit complicated way, to get buttons to work, if button holds some more complicated operations(actually you have to make your own SLOT's).
Tutorial:
http://sector.ynet.sk/qt4-tutorial/
http://doc.trolltech.com/4.2/examples.html
3.GTK+
Sorry, but I never tryed it, so Google might help you.

Why use Win32 api? It is C (Microsoft C plus Standard C). For GUI programming in Windows use MFC (Microsoft Foundation Classes) up to Visual C++ 6.0. After that there is .NET 7.0, 7.1 for Visual C++ 2003 that uses WinForm and the real stable C++ .NET is Visual 2005 that uses WinForm (taken from Visual Basic features) for .NET framework 2.0 and above.
Yes, or *NIX you can use GTK/QT/Motif and other third party libraries/frameworks

>Why use Win32 api?
Why not?

>It is C (Microsoft C plus Standard C).
A C API can be used by C++ too.

>For GUI programming in Windows use MFC (Microsoft Foundation Classes) up to Visual C++ 6.0.
I agree to a point. MFC helps for the things that MFC handles. But the Win32 API covers a great deal more than MFC, and it's best to know the API itself before using a thin wrapper around it. Otherwise you may be overwhelmed with confusing issues.

>After that there is .NET
Which involves learning the bastardized C++/CLI language. If you're doing .NET, I recommend forgetting about C++ altogether and using C# or VB.NET. The C++/CLI standard is hideous.

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.