943,691 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 5466
  • C++ RSS
May 2nd, 2007
0

Is There a way to create a GUI in C++

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vikter is offline Offline
11 posts
since Jul 2006
May 2nd, 2007
0

Re: Is There a way to create a GUI in C++

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.
Reputation Points: 118
Solved Threads: 30
Posting Shark
linux is offline Offline
931 posts
since Aug 2006
May 2nd, 2007
0

Re: Is There a way to create a GUI in C++

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is online now Online
21,950 posts
since Aug 2005
May 2nd, 2007
0

Re: Is There a way to create a GUI in C++

If you run a *nix you can use GTK or QT.
Reputation Points: 343
Solved Threads: 24
Veteran Poster
Sturm is offline Offline
1,067 posts
since Jan 2007
May 2nd, 2007
0

Re: Is There a way to create a GUI in C++

Click to Expand / Collapse  Quote originally posted by linux ...
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}
Reputation Points: 23
Solved Threads: 12
Posting Whiz in Training
n.aggel is offline Offline
202 posts
since Nov 2006
May 2nd, 2007
0

Re: Is There a way to create a GUI in C++

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.
Last edited by jan1024188; May 2nd, 2007 at 2:48 pm.
Reputation Points: 27
Solved Threads: 2
Posting Whiz in Training
jan1024188 is offline Offline
254 posts
since Aug 2006
May 3rd, 2007
0

Re: Is There a way to create a GUI in C++

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
Reputation Points: 10
Solved Threads: 3
Newbie Poster
stupido is offline Offline
6 posts
since May 2007
May 3rd, 2007
0

Re: Is There a way to create a GUI in C++

>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.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: C++ question class, friend operators
Next Thread in C++ Forum Timeline: Sending a dos environment variable to fstream instance





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC