GUI by C++??

This is a discussion on GUI by C++?? within the C++ Programming forums, part of the General Programming Boards category; Can i give Graphical User Interface to my applications using C/C++ in any way? I heard that it is possible ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    3

    GUI by C++??

    Can i give Graphical User Interface to my applications using C/C++ in any way?
    I heard that it is possible by using C# only..
    If it is possible then that will be restricted to Windows only or OS independent. I mean if i run (compile) that application on UNIX environment will that work?

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    C and C++ have the capability for GUIs just as much as C# does, it is only that in C# it is considered easier to create your GUI application.

    There are cross platform GUI libraries for C++ that you can use (e.g. wxWidgets). If you create your GUI with such a library, it will work on Windows, Unix, and any other OS the library supports.

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    3
    Hey thanks alot..
    Can u give me any link giving more details about this..
    I will be very very thankful..
    Thanks..

  4. #4
    Registered User
    Join Date
    Aug 2007
    Posts
    3
    Hey i found that by googling..
    there is no way for the same using existing libraries(which are under ansi C)??

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    Standard C and C++ don't have GUI libraries.

    You can use each platform's API, for example, you can program directly to the Windows API in C or C++. This won't be cross-platform, though.

  6. #6
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    You can create an ugly text-based GUI, displaying various options and requiring the user to enter certain keys to go from one screen to the next... but any sort of modern GUI is platform specific. If you want multi-platform code & GUI's, use Java.

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,146
    but any sort of modern GUI is platform specific
    I don't agree, there are many cross-platform GUI libraries out there - Qt, GTKmm (C++ binding of GTK), WxWidgets and probably many others.

  8. #8
    Day Dreamer
    Join Date
    Apr 2007
    Posts
    45
    I have personally worked on GUIs using C/C++ supporting multiple platforms.
    The examples being, as mentioned in the previous post, Gtkmm, Qt etc.
    I have worked on these two and I know they support multiple platforms!

  9. #9
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Sorry, I should have said "...but any sort of modern GUI using standard libraries is platform specific", since sunil_ghai was asking if there was a way to do it without 3rd party libraries...

  10. #10
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    They are platform specific to a certain extent, and aren't "truly" portable. Of course their is going to be 3rd partly libraries, the who's to say you even have a screen or want one? GUIs are platform specific, it wouldn't be a simple port if you wanted to get C running on another platform...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert Windows GUI to Linux GUI
    By BobS0327 in forum Linux Programming
    Replies: 21
    Last Post: 11-27-2005, 03:39 AM
  2. .NET And GUI Programming :: C++
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 01-27-2002, 03:22 PM
  3. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 02:22 PM
  4. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 07:03 PM
  5. GUI (Graphical User Interface) Help Needed
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-11-2001, 10:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21