Programs with GUIs

Hello all! I still consider myself a beginner in programming and so I assumed this question was best posted in the beginner's forum.

Currently I am working through the book: Sam's teach yourself C++ in 24 hours.
So far throughout the course I've been instructed to create console application programs, so they only run in the Command prompt window. I've been having a lot of fun with it and I've been learning tons of awesome new things. However I am wondering how you would write a program which has a Graphical User Interface. So instead of mere text on the black command prompt window I would like to make programs with colors, buttons, animations and so on. I wouldn't know where to start in the pursuit of this however. So how would I go about writing programs with these capabilities? Thanks in advance!

~Neo
Pick a widget toolkit.

https://en.wikipedia.org/wiki/List_of_widget_toolkits

Qt is good.
Last edited on
closed account (E0p9LyTq)
The Fast, Light Toolkit (FLTK) is what Bjarne Stroustrup uses for the GUI library in his book "Programming: Principles and Practice Using C++."

http://www.fltk.org/
A simple to use and modern C++ GUI library is Nana: http://nanapro.org/en-us/
It is small and beginner friendly. A wiki is here: https://github.com/qPCR4vir/nana-docs/wiki
And there are examples: https://github.com/qPCR4vir/nana-demo
and a new forum for your questions: http://nanapro.org/en-us/forum/
This is a simple example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <nana/gui/wvl.hpp>

#include <iostream>


void clicked(const nana::arg_click & eventinfo)
{
     std::cout<<  "When the window  fm  is clicked, this function is called. \n";
}



int main()
{
    using namespace nana;
    form fm;
    fm.events().click(clicked);
    fm.show();
    exec( );
}
Last edited on
Topic archived. No new replies allowed.