Introduction to GUI programming with c [closed] Introduction to GUI programming with c [closed] c c

Introduction to GUI programming with c [closed]


If you are strictly limited to C, you have only a few choices. GTK+ is probably the easiest for a beginner.

An object oriented language like C++ is far more suited to GUI programming. If you like to use C++, I strongly recommend Qt, mainly because of its very good documentation, with very good tutorials especially for beginners.


I wouldn't suggest trying to do GUI with C. It's not really that comfortable to do so.

But if you really want to do it. Here's a quite nice tutorial on Windows API.

You can also use a library like Allegro, it is meant for games, but can be equally useful in programs.

But the way I would suggest is, first learn the basics of GUI and application (that means state machine) programming with a simple language (any simple will do, personally would suggest Lua with Löve2D platform). And then use the knowledge you got in C. The state machine and event-flow will be harder to grasp if you have to deal with garbage collection and pointers... (it's still possible to learn).


I'd suggest you should try to learn some object oriented programming properly with a language such as Objective C or C++, since GUI programming is difficult. Particularly even more so in C.

A lot of the concepts in GUI programming revolves about you knowing how objects work, with all the widgets that are composed in any GUI framework, and how they interact together. There is also the concept of events that sends messages from one input source to a graphical component (or between two graphical components).

In summary: it becomes a lot easier to read through documentation when you know what the objects are all about… and even then there is a lot to take in.