Jump to content

  • Log In with Google      Sign In   
  • Create Account


The best GUI


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
23 replies to this topic

#1 Muhammad Sabry   Members   -  Reputation: 106

Like
0Likes
Like

Posted 27 February 2012 - 07:35 AM

Hello everybody...

I'm a beginner C++, I've been already coding for console,but now I think it's the time to move to window application,
So my question is What is best GUI and why?
i've been searching on the web and I found (MFC, QT, wxWidgets), but I really don't know which one to choose.
So HELP ME PLEASE.Posted Image

Note:
I'm for sure wanna be a games programmer at the end.


Thanks

Sponsor:

#2 Telastyn   Crossbones+   -  Reputation: 3726

Like
0Likes
Like

Posted 27 February 2012 - 07:51 AM

If you're a beginner, the console.

#3 SimonForsman   Crossbones+   -  Reputation: 6041

Like
1Likes
Like

Posted 27 February 2012 - 08:01 AM

best GUI for what ?

What platform(s) ?
Game or Desktop Application ?

Both QT and wxWidgets are good Desktop GUI APIs (QT is also good for Symbian/Meego mobile apps), i personally prefer QT but you're likely to find alot of people here who prefer wxWidgets aswell, look at some example code for them and pick the one that seems easiest to start with. (Switching API is fairly trivial anyway)

I'd recommend against MFC as it is:
1) Crap
2) Not included with the express edition of Visual Studio
3) Crap

If you are going to make games rather than GUI applications then something like SFML or SDL will be a better option.

You can also use plain old Win32 if you restrict yourself to the Windows platform, its good enough for simple stuff or you can go the .Net route and use WinForms (Which is pretty darn awesome but you probably want to swtich to C# then)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#4 Muhammad Sabry   Members   -  Reputation: 106

Like
0Likes
Like

Posted 27 February 2012 - 08:08 AM

Ok I've done alot of codes in console and still doing, but I'm not gonna stuck all my life with console Posted Image
So any advice from you "Telastyn".

#5 kunos   Crossbones+   -  Reputation: 2205

Like
0Likes
Like

Posted 27 February 2012 - 08:18 AM

There is no good answer to this question.

QT is pretty awesome, but, it extends C++ with some custom keyword and constructs.
MFC causes brain damage, avoid at all costs.


wxWidgets I am not very familiar with.. but they should be more C++like.. the other options I can suggest are:



GTK+. Never used it, can't comment.

Microsoft CLI/C++ managed c++ however they call it. I did use an it is not that bad.

But seriously, for GUI application you should stick to C# .NET/MONO and, if you really want, your logic in C++.


Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#6 Muhammad Sabry   Members   -  Reputation: 106

Like
0Likes
Like

Posted 27 February 2012 - 08:19 AM

best GUI for what ?

What platform(s) ?
Game or Desktop Application ?


1- best GUI for window programming. if I understood your quesition.
2- I know that mfc is for MS windows, and eather qt or wxWidget is a cross plateform, which make them in higher position than mfc.
3- Desktop Applications, but sooner or later I will start programming for games.
Thanks

#7 ApochPiQ   Moderators   -  Reputation: 15025

Like
1Likes
Like

Posted 27 February 2012 - 12:02 PM

C++ is a terrible language for GUI design and implementation.

I second C#. The WinForms editor is stupid easy to learn and gives you a lot of power with minimal investment. C# is not hard to learn and is also easy to bind to C++ if you need the raw speed. (Hint: you may think you do, but you don't.)

There's also Java which has a similar flavor to C#, but Java is a meh language at best, and the UI toolkits are a nightmare to work with for nontrivial designs. Unless you need Java or can use something like Android's UI toolkit, I wouldn't bother.

If you're on a Mac, the Interface Builder/Cocoa combination is about as close as you'll get to WinForms. Almost as good but not quite, and you have to use Objective C and Xcode, which are not exactly great (well, Xcode is more the problem than Objective C, frankly).


Just in case the basic trend hasn't become apparent: don't use C++ for UI implementation if you can possibly avoid it.

#8 nitro glycerine   Members   -  Reputation: 103

Like
1Likes
Like

Posted 27 February 2012 - 12:27 PM

I would also second Qt, I think it's fantastic. There is also an extensive library available at your disposal. See: http://doc.qt.nokia.com/5.0-snapshot/qtcore.html Qt is perfectly fine for desktop programs, you will want to look into QtCreator as well if you choose to use it.

#9 Promit   Moderators   -  Reputation: 6611

Like
0Likes
Like

Posted 27 February 2012 - 01:14 PM

Go with wxWidgets or Qt. Definitely not MFC or the other fringe options.

#10 ApochPiQ   Moderators   -  Reputation: 15025

Like
0Likes
Like

Posted 27 February 2012 - 01:27 PM

Muhammad: I have merged your two threads into a single discussion (previously there was one copy in Game Programming and one in General Programming). In the future, please do not post multiple copies of the same topic in different forums.

Thanks!

#11 Muhammad Sabry   Members   -  Reputation: 106

Like
0Likes
Like

Posted 27 February 2012 - 04:27 PM

Muhammad: I have merged your two threads into a single discussion (previously there was one copy in Game Programming and one in General Programming). In the future, please do not post multiple copies of the same topic in different forums.

Thanks!


I'm sorry for doing that, it's just I didn't see the General programming section at the first. So I'm sorry again,and thanks for the merging.

#12 Malc0lm   Members   -  Reputation: 102

Like
1Likes
Like

Posted 28 February 2012 - 10:47 AM

I never coded a single bit of C# in my life, however I do have quite some experience with GUI coding (in C++) using wxWidgets, which I think totally rocks. But since I can't compare from own experience: what makes coding GUIs in C# a better choice over C++ with wxWidgets?

#13 kunos   Crossbones+   -  Reputation: 2205

Like
0Likes
Like

Posted 28 February 2012 - 11:51 AM

I never coded a single bit of C# in my life, however I do have quite some experience with GUI coding (in C++) using wxWidgets, which I think totally rocks. But since I can't compare from own experience: what makes coding GUIs in C# a better choice over C++ with wxWidgets?


the simple fact that you can use a language that has the constructs needed for nice event handling built in the language itself (ie. delegates) as opposed to a language where these constructs have to be simulated using preprocessing hacks (QT) or some other convoluted system simply to use a member function as a callback.
Also the built in reflection and metadata in C# makes it much easier to build a visual gui editor.
But the real answer to your question is 3 clicks and 15 minutes of coding away.. that is.. download Visual C# and see yourself... it really just takes 10 minutes and a simple 1 button application (WinForm) to convince yourself there is no real comparison.
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#14 Malc0lm   Members   -  Reputation: 102

Like
0Likes
Like

Posted 28 February 2012 - 02:13 PM

Would a C# project also work (i.e. be compilable) for other platforms than Windows? And more specifically, does it give native controls (i.e. Windows look & feel on Windows, OS X look & feel on OS X, etc) on the supported platforms?

#15 swiftcoder   Senior Moderators   -  Reputation: 9853

Like
0Likes
Like

Posted 28 February 2012 - 03:07 PM

the simple fact that you can use a language that has the constructs needed for nice event handling built in the language itself (ie. delegates) as opposed to a language where these constructs have to be simulated using preprocessing hacks (QT) or some other convoluted system simply to use a member function as a callback.
Also the built in reflection and metadata in C# makes it much easier to build a visual gui editor.

The same goes for Objective-C/Cocoa, or Python/Kivy. Of course, all these options place certain limitations on portability.

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#16 kunos   Crossbones+   -  Reputation: 2205

Like
0Likes
Like

Posted 28 February 2012 - 11:32 PM

Would a C# project also work (i.e. be compilable) for other platforms than Windows? And more specifically, does it give native controls (i.e. Windows look & feel on Windows, OS X look & feel on OS X, etc) on the supported platforms?


a simple WinForm application will run, without recompiling, under Mono on lots of different platforms.

Having said that, I dont see the issue of portability raised by the OP. The typical usage of a GUI application in the game development industry is for tools, and who really cares about portability of a tool? Hardly a show stopper for these kind of applications where the main discriminant is productivity and robustness, and rightly so.
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#17 d000hg   Members   -  Reputation: 733

Like
0Likes
Like

Posted 29 February 2012 - 08:16 AM

I've used wx quite a lot and it's pretty good, but it will look businessy and not 'cool'. If you're making games, you maybe don't need to use a standard GUI framework at all - you might do all your GUI in-game.

A note on MFC; it sure is ugly under the hood but I actually quite like developing with it and apps will look nicer than with wx since you can access the fancy Windwos-only controls. Of course if you want to go cross-platform, not an option.

#18 WillPash   Members   -  Reputation: 211

Like
1Likes
Like

Posted 01 March 2012 - 07:15 PM

I agree, for beginners C# forms is the way to learn. For C++ QT is very good, and it supported by all major platofrms; even mobiles. GTK+ is quite good, but more lower level and harder to understand at the beginning. With these GUI APIs you can create some really useful tools, which will aid you in the future when you develop games (making your own game editors, etc).

Get to grips with raw C++; bare in mind as ApochPiQ mentioned isn't GUI development friendly. So write some console apps, and when you are ready and you have covered not only C++ programming; you have also learned the structure of a program. Once you get to writing GUI applications, knowing about message queueing, events, input, GUI interaction will come with patience and most importantly persistance.

Agree with the previous posts MFC is absolutely terrible, do not bother. I've heard good things about WX as well. To be honest, there are plenty of alternatives; These GUI's are good bases to learn when you are ready. Just to add, a lot of in-game menus (HUDs) and GUI are usually done with Crazy Eddie's GUI, which not only uses C++, but also easier languages like C#, Python, and many more . Look at the video demos for now, once you get more acclimatised to more graphical programming, remember it and give the code examples a try.
Dave 'Kit' Wilson - Reliant Code

#19 DarkRonin   Members   -  Reputation: 604

Like
-3Likes
Like

Posted 02 March 2012 - 04:48 AM

IMO, the best GUI is one you roll for yourself.

I have a GUI system in place for my own app that I am working on. Rolled it in less than a day. There is nothing that I can't do with it. So, it is good for what I want (currently games programming).

#20 hannesnisula   Members   -  Reputation: 1009

Like
1Likes
Like

Posted 02 March 2012 - 05:47 AM

I love the C++ Win32 API. Straight forward and intuitive as well.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS