Thread: GUI programming in C

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    30

    GUI programming in C

    Hi,

    I have learned the basics of C, and now I want to code GUI's in C. I want to do it for both Windows and Linux.

    Can someone tell me how it can be done?

    Thanks.

    Ben

  2. #2
    Registered User
    Join Date
    Sep 2022
    Posts
    59
    As you may have already observed, the C standard doesn't provide any functionality to handle graphical interfaces. This needs all platform-specific code which is not even comparable with each other. I strongly recommend you to use a 3rd party GUI library that already wrapped all those platform code into a unified API.

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    30
    Thanks.

    Which 3rd party GUI libraries can you recommend?

  4. #4
    Registered User
    Join Date
    Sep 2022
    Posts
    59
    I don't do GUI programming. In the only little GUI programs I ever wrote I used pure Win32 API which is for masochists
    Others here might be more experienced though.
    In the meanwhile have a look at List of widget toolkits - Wikipedia
    You may find that not too many C libs exist. It's semantically more logical treating GUI components as objects where object-oriented languages suit better.

  5. #5
    Registered User
    Join Date
    Feb 2008
    Posts
    30
    Thanks for pointing me in this direction.

    If someone has more info please let me know.

  6. #6
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,128
    Quote Originally Posted by daYz View Post
    Thanks.

    Which 3rd party GUI libraries can you recommend?
    I don't do GUI programming myself either, but I would look at GTK and QT, the most common for GUI programming in Linux.

    I can't comment on Windows GUI programming other than I try very hard to stay away from Mickey$oft as much as possible! ;^)

  7. #7
    Registered User
    Join Date
    Feb 2008
    Posts
    30
    Quote Originally Posted by rstanley View Post
    I don't do GUI programming myself either, but I would look at GTK and QT, the most common for GUI programming in Linux.

    I can't comment on Windows GUI programming other than I try very hard to stay away from Mickey$oft as much as possible! ;^)
    GTK and QT both work on Windows, Linux and MacOS. GTK also works on UNIX. QT does not, if I am right. QT also does run on Android and embedded systems.

    If anyone has more information, please let me know. I am curious about the most common libraries for Windows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 02-01-2019, 12:27 PM
  2. Replies: 0
    Last Post: 02-01-2019, 12:22 PM
  3. Replies: 4
    Last Post: 12-11-2011, 04:25 PM
  4. small programming job VCPP / Object Oriented Programming
    By calgonite in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 01-04-2006, 11:48 PM
  5. Total newb to programming here... Question about the many programming languages. Ty!
    By tsubotakid1 in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 10-05-2003, 10:32 AM

Tags for this Thread