Seeking help abou GUI as a beginner

Oct 12, 2015 at 1:04pm
I'm a new programmer and I have only solved the problems in command promp box at windows. But I want to learn to make e proper software which will have GUI.. Please anyone suggest me how could I learn GUI
Oct 12, 2015 at 1:11pm
If you want to make a game, use a graphics library like SFML:
http://www.sfml-dev.org/

If you want to make a GUI application, use a library such as Qt:
https://www.qt.io/developers/

There are of course other alternatives, such as Magnum, Allegro, wxWidgets, etc.
Oct 15, 2015 at 4:21am
You could also read up on the WINAPI which is Microsofts own GUI library for building Windows applications. Simply include it into your project with #include <Windows.h> and get started!
Last edited on Oct 15, 2015 at 4:21am
Oct 15, 2015 at 1:55pm
@CGunn86: I strongly recommend not doing that, as it will severely limit your ability to compile your application/game for other platforms such as Mac and Linux. Also, the Windows API is a C API, and using it in C++ is a nightmare. Unless you have a really good reason to need to work directly with the Windows API, I recommend using a more high level library that is portable to other platforms and integrates better with C++ idioms.
Oct 15, 2015 at 3:05pm
@LB: what about unreal engine?
Oct 15, 2015 at 5:04pm
@chipp: I've personally never used Unreal Engine, but it would definitely be a good idea to use it if you wanted to make a 3D game. Generally people want to start with a simple 2D game though and not have to worry about all the complicated math.
Last edited on Oct 15, 2015 at 5:04pm
Oct 15, 2015 at 7:41pm
closed account (E0p9LyTq)
The minimum requirements for the Unreal Engine on Windows are a bit steep, Win7/8 and 64-bit required, especially when starting out learning GUI interfaces. Similar with Mac.

Linux looks like the only OS that is not so high-end.

Bjarne Stroustrup uses the Fast Light Toolkit (FLTK) GUI library: http://www.fltk.org/index.php

I can't say personally if it is any good because I have not used it yet, but I would consider the creator of C++ using it makes for a worthy recommendation.
Last edited on Oct 15, 2015 at 8:13pm
Oct 18, 2015 at 1:58am
@LB I suppose using a higher level multi platform is one way to go. Though if you want to truely understand what your code is doing and have full control of everything then you'll want to learn a lower level language and negate all of those higher level library abstractions. To each their own though I suppose.

Do you want a high level language library that does most everything for you or do you want to have full control of your code and know exactly what it's doing at every line. Some prefer to just bang out a quick application with something like wx or QT. Others enjoy writing from the ground up having maximum control.
Oct 18, 2015 at 4:41am
@CGunn86: I prefer to take the simplest route first and then optimize bottlenecks later as needed. In most cases I never need to do that, so I never have to work with lower level stuff. After all, the point of programming is to write less code, not more.
Oct 18, 2015 at 5:57am
@LB Again, to each their own. Some people do prefer the quick and dirty approach, with "less code", while others might prefer the more complex route. I wouldn't say "the point of programming is to write less code". That philosophy may be accurate for some of the higher level libraries however, but I wouldn't say programming in general.

It really boils down to personal preference and job ahead. Grab a library(Qt, wx) and bang out 4 lines of code for a window, with minimal control over how it's being loaded, or grab a cup of coffee and write it out with absolute control, the choice is yours :)

Back on topic though, for a beginner (the OP), I would agree that something like Qt or Wx would be the best approach.
Oct 19, 2015 at 7:19pm

Do you want a high level language library that does most everything for you or do you want to have full control of your code and know exactly what it's doing at every line. Some prefer to just bang out a quick application with something like wx or QT. Others enjoy writing from the ground up having maximum control.


I'm with you CGunn86. For the stuff I do I wouldn't touch any of the cross platform libraries with a 10 foot pole. But I do realize the world has changed. Sounds like it would be best for the OP.
Oct 19, 2015 at 8:39pm
freddie1 wrote:
For the stuff I do I wouldn't touch any of the cross platform libraries with a 10 foot pole.
Maybe you only want or need to target a single platform, but with the large variety of devices and operating systems in use I personally like to make my code work in as many environments as possible without having to actually worry about getting to intimately know each environment. I refuse to teach people otherwise as it would only serve to hinder them when they want to target other platforms.
Last edited on Oct 19, 2015 at 8:40pm
Oct 19, 2015 at 8:50pm
closed account (E0p9LyTq)
@LB,

Even Microsoft has figured out what cross-platform support means, Visual Studio 2015 supports creating apps for Windows, iOS or Android.
Oct 19, 2015 at 10:22pm

Maybe you only want or need to target a single platform, ...


Yes, I only do Windows (but this is, afterall, the Windows subforum of www.cplusplus.com).
Oct 19, 2015 at 11:06pm
closed account (E0p9LyTq)
If learning the Windows GUI is what you want then here's as good a resource as any:

Programming Windows: Writing Windows 8 Apps With C# and XAML (Developer Reference) http://www.amazon.com/Programming-Windows-Writing-Developer-Reference/dp/0735671761/ref=dp_ob_title_bk
Last edited on Oct 19, 2015 at 11:06pm
Oct 19, 2015 at 11:35pm
closed account (z05DSL3A)
freddie1 wrote:
For the stuff I do I wouldn't touch any of the cross platform libraries with a 10 foot pole.
LB wrote:
Maybe you only want or need to target a single platform, but...
I'm not a much of a fan of cross platform libraries for UI/UX, I much prefer native implementations for that.
Oct 20, 2015 at 1:42pm
Certainly everything's going high level where one must bore through layer upon layer of abstractions sitting atop the bare metal. And I'll even accept that as being the best option for a lot of folks learning coding now. But I think there's still room for native implementations.
Oct 20, 2015 at 7:42pm
@freddie1: I don't know where you're getting "layer upon layer" from - usually these cross platform libraries are just one layer between your code and the native platform libraries. It's normally a zero-cost abstraction.
Oct 20, 2015 at 9:47pm
Point taken LB. I tend to exagerate. Its a weakness of mine. I guess I picked up the phrase from this interesting article...

http://lispian.net/2011/11/01/lasagna-code/

And if you liked that one (I doubt you do), there's this...

http://lispian.net/2011/11/25/lasagna-code-redux/
Last edited on Oct 20, 2015 at 9:51pm
Oct 20, 2015 at 11:25pm
Not sure how those are relevant? It's true that sometimes people go too far with abstractions, but I don't believe that's the case with the libraries I use and recommend. Besides, C++ is pretty much known for zero-cost abstractions.
Topic archived. No new replies allowed.