Thursday, July 9, 2009

What should I use for C GUI programming?

I have used Qt with C++ but for C is there a different library to use? Also some people are telling me to use windows API, they say even though it is hard it is better than using Qt and other libraries


Can someone give me some advice on what to use please?

What should I use for C GUI programming?
GTK+ is totally written in C. Windows API is better than Qt? LOL. Well I guess that depends on what you are trying to do. If you plan on making a commercial product, Qt is may not be for you(licensing). GTK+ is totally open source, it follows an object-oriented design, even though it is written in C. As far as Windows API, are you looking for straight C programs? You mentioned C++. Qt is good because it is cross platform and well documented. If you are only concerned about Windows, there are lots of alternatives. Windows API can be a pain in the butt. Check out the Windows Presentation Foundation or Windows Forms. You also have the MFC(C++) and other things. C# is an excellent programming language and .NET makes things easy in Windows. There is also Visual Basic. If you want to learn the Windows API, I would suggest the book by Charles Petzold.
Reply:There's no major Windows (or Unix for that matter) GUI toolkit based on C only - all of them (Qt, vxWidgets, MFC, GTK+ ...) are all based on C++.





It is by all means possible to write Windows GUI programs in bare C using Windows API - that has been done and I've certainly done that myself back in the day, however this only makes sense for very simple programs and the learning curve is pretty steep.








-- added --


Yeah, Cipher is right actually - GTK+ is entirely in C, but that does not make it less complicated than C++ kits or Windows API.


No comments:

Post a Comment