user1438841
user1438841

Reputation: 21

What is the difference between GTK and Win32 Native API in C?

I'm a beginner in C programming. I read about some tutorials and forums about creating GUI application in C. I encountered some terms like GTK, Win32 native API. They say that GTK is one of the library to use in creating GUI application. I also tried the code that create a simple window using Win32 API. What are the difference between them?

Thanks.

Upvotes: 0

Views: 2335

Answers (3)

Amir
Amir

Reputation: 11

Gtk+ = cross-platform and very powerfull. more simple than win32. more tools you will have. win32 = just in windows. standard windows GUI framework.

and DUDE! Gtk+ in windows is a pain in the ass. but for any othe supported platforms I reccomend Gtk+ for a widget toolkit.

Upvotes: 1

paulsm4
paulsm4

Reputation: 121759

Win32 is the "native" API for Microsoft Windows. You can only run it on Microsoft Windows.

GTK+ is also a GUI library. You can run it on multiple different platforms.

Qt and SDL are other multi-platform libraries. Like GTK+, the same GUI can be recompiled to run on multiple different platforms: Windows, Linux, MacOS, etc etc.

Upvotes: 1

Alok Save
Alok Save

Reputation: 206566

GTK is multi-platform tool kit for creating graphical user interfaces(GUI).
In short they provide a framework which you can use as an library for developing your UI applications.

Win32 API is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. These are restricted only for windows platform.

The language rules for c/c++ are governed by ISO standards which define what functionality every standard c/c++ implementation has to provide.Note that both of above provide some functionality that is over and above what the standard libraries provide.Basically, they provide you boiler plate framework for easy usage instead of reinventing wheels for your project.

Upvotes: 3

Related Questions