CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2008
    Posts
    1

    GUI Programming In C++?

    So, I've Learned A Reasonable Amount Of C++, but I'm now struggling to understand how to write GUI programs, i can write command line programs but i cannot find any where that tells me how to make GUI ones. Does Anyone Know Anything About It Or How I Can Write GUI Applications?

    Im Using XCode On Mac OS X Leopard 10.5.4.

    If Any One Can Help It Would Be Much Appreciated .

    My Email: [email protected]
    MSN: [email protected]
    Skype: alex.saidani

    Thanks In Advance!
    Last edited by alex.saidani; September 18th, 2008 at 12:44 PM.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: GUI Programming In C++?

    Well, I believe Apple's GUI toolkit is called Cocoa, so you might want to read up on that.

    There are also a number of cross-platform toolkits you may wish to look into: GTK+, WxWidgets, FLTK, etc. Of these GTK+ is the only one I have direct experience with.

    GUI programming is "event-based", meaning that your main function does some initial setup and then calls an event loop function from the toolkit which takes over all execution of the program; and all further processing on your end is done via callback functions when events (such as a screen redraw or a mouse move) occur.

  3. #3
    Join Date
    Aug 2005
    Location
    LI, NY
    Posts
    576

    Re: GUI Programming In C++?

    Quote Originally Posted by Lindley
    Well, I believe Apple's GUI toolkit is called Cocoa, so you might want to read up on that.
    Cocoa is an Objective-C framework (could they have picked an uglier language?), although it is possible to incorporate C++ code into a Cocoa application (using "Objective-C++" as its called). Carbon is Apple's GUI framework for C/C++, but it seems to be less supported these days, if the decision not to give it 64-bit support is any indication.

    At any rate, a cross-platform library such a wxWidgets is probably the way to go.

    To the OP: For future reference, the only thing posting your e-mail address is going to accomplish is to direct boatloads of spam to your inbox. This is a forum and people can answer you directly without resorting to e-mail.
    - Alon

  4. #4
    Join Date
    Apr 2004
    Location
    England, Europe
    Posts
    2,492

    Re: GUI Programming In C++?

    Quote Originally Posted by Hermit
    At any rate, a cross-platform library such a wxWidgets is probably the way to go.
    Yes, I agree.
    My hobby projects:
    www.rclsoftware.org.uk

  5. #5
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: GUI Programming In C++?

    Hello Hermit, do you have any good reference beside the official documentation for WxWidgets ?

    Thanks.

  6. #6
    Join Date
    Mar 2004
    Location
    Central Florida
    Posts
    293

    Re: GUI Programming In C++?

    wxWidgets lists a couple of books on their website:

    http://www.wxwidgets.org/

    I'm partial to "Cross-Platform GUI Programming with wxWidgets".
    "Effective teaching is the essence of leadership..."

    "There is no substitute for a carefully thought-out design."

    If you have found this post to be useful, please Rate it.

  7. #7
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: GUI Programming In C++?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured