Creating a borderless GUI in C

I am learning C (I just finished Chapter 2 or Unit 2) of the C programming language, I got to the end and saw that nothing was said about how to create a GUI, and from that, I looked up, it seems I need to use framework, but I hate the idea of ​​this. How to create a borderless GUI? How exactly do these structures work and in what language are they written? I am not making a massive application, even if I need a week, would it be possible to write a GUI application (in C) to do something even AMAZINGLY BASIC, simply by pressing a button that does nothing or something simple?

PLEASE PAY ATTENTION TO BE A CROSS PLATFORM I A LINUX USER AND BSD.

+6
source share
4 answers

You can create your own structure based on OpenGL or Xlib. Or use a good graphics library like Motif or CGUI . Or use something terrible like GTK.

+2
source

Yes, don’t leave.

C cannot do anything but manage memory and possibly do software interrupts (if you are doing hacking).

You need a library to do something.

The GUI is very complex, you cannot do anything “simple” with it. This is a problem that I face every day.

If you need a window on C, you need X11, GTK, Windows API, hacking video or other funny things.

Oh, and hacking a video is not an option, the OS will throw an exception if you even try to touch the video memory without its permission.

Oh, and the “simple button” you are talking about in the Windows API is actually the window itself, not very simple.

+3
source

Not the best way. I would suggest a cross platform library like GTK + .

+3
source

You can create a basic structure using WINAPI

There is a great tutorial here.

The problem with using C and primitive frameworks like WINAPI is that manipulating layout and state becomes extremely difficult.

If you focus on a normal operating system, the C requirement becomes unreasonable. I recommend that you go with C++ and Qt and compile your C code in a C++ .

+2
source

All Articles