Thought I'd make my own thread too Very Happy

I've learned a bit of C recently, and I can make a command-line program, but I can't seem to find any clear tutorials on making an app with a GUI. How do I make one? I saw a lot of tutorials on something called OpenGL, is that it?

Thanks for any help!
There's a bunch of different ways to make a program with a GUI. OpenGL is probably not the correct way to do it, since OpenGL is more a graphics library (think windowed game). The "easy", compromise solution would be to give NCurses a try, which lets you create text-based GUIs that are actually quite nifty. As far as true GUIs, GTK and QT are the reigning cross-platform technologies if you care about running your program in Linux, or you can use the Windows API if you're purely coding for Windows.
I would definite suggest ncurses, like Kerm said. It's not going to give you the pretty windows you get with something like GTK or QT, but it's a lot of fun, and pretty simple to get going.
Thanks for the tips. ncurses is for terminal-based graphics, right? I'll try that.
Here's a demo of ncurses in action, my own SysMon v1.0 project from a year or two ago. The source is included, if I recall correctly, so you can hopefully learn a bit by staring at the source code.

Qt is for C++, and is absolutely *amazing*. An absolutely fantastic API.

GTK is for C and, like most things in C, it is a big ugly hack. But if you want a powerful C GUI library that is cross platform (or runs on Linux), GTK is the best.
What's big, ugly, and hackish about GTK, Kllrnohj? I've never had a personal chance to use it, fortunately or unfortunately. Sad
KermMartian wrote:
What's big, ugly, and hackish about GTK, Kllrnohj? I've never had a personal chance to use it, fortunately or unfortunately. Sad


There's the typical C hack of using structs as a poor man's class. GUIs are one of those things that fit OOP perfectly, so using one from a non-OOP language is just annoying. Then there's things like using strings for events like this:


Code:
button = gtk_button_new_with_label ("Hello World");
g_signal_connect (button, "clicked",
     G_CALLBACK (hello), NULL);
Ooooh, I actually have messed around with that stuff before, but only for the most rudimentary control over windows for my thesis. Yeah, it was fairly ugly if I recall, though functional.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement