Thread: A question on GUI's for a begginer

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    99

    A question on GUI's for a begginer

    Hi, I have a number of programs that I have created in the command line form. They work exactly how I want them to but I suppose my next step would be to create a nice little GUI to make them a little bit more user friendly. In the past I have used java and i've found this quite nice to make simple GUI's easily but with C++ i have to say i'm a little put off. Is there an easy way to do this? I got a hold of the borland c++ builder 6 but i found when i inserted my code into it it wasnt recognizing some of my syntax yet it worked well and command line level. I keep seing things like MFC flying about but I know not what this is so i please forgive me if my questions are maybe a little bit stupid but I guess what i'm asking is if anyone knows a good and simple approach to creating a nice and easy gui for my programs? Is there a particular path i should follow to develope skills in the GUI area?

    any input will be appreciated

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by pastitprogram View Post
    I keep seing things like MFC flying about but I know not what this is so i please forgive me if my questions are maybe a little bit stupid but I guess what i'm asking is if anyone knows a good and simple approach to creating a nice and easy gui for my programs? Is there a particular path i should follow to develope skills in the GUI area?

    any input will be appreciated
    Unfortunately, with C/C++, it's just not as easy because there's no standard way of doing GUIs.
    Fortunately, there are lots of frameworks out there that can handle doing GUIs. MFC is one of them and is a Windows-only, non-free solution.
    There are other free frameworks out there such as wxWidgets, Qt, GTK, Gnome and more.

    It's a matter of finding one you think is best and sticking with it, then learning how to use it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Since you seem to be programming for MS Windows, The Forgers WinAPI Tutorial is a good place to start. (Any Windows compiler can compile the WinAPI library.) Then if you want to really dig-in and learn WinAPI, get Petzold's book.

    Microsoft is "pushing" .Net, but I think it's still useful to start with WinAPI.

    I've never used MFC, but it's supposed to make Windows programming "easier". I think MFC and Borland Builder generate lots of the code for you. I chose to avoid that approach, because I wanted to understand what was "going on under the hood".

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I disagree with the whole "learn what's under the hood" for Win32 API. Obviously, you can get away with it with dotNet or VB or the like, so I would suggest the same for C++.
    Learning Win32 API will only give you headaches and you will probably forget it all at one time or another due to its complexity.
    It's far better to use a framework such as MFC.
    As a MFC dev, I have lots of experience and can MFC really does simplify things, but it's still a very fat wrapper, so an additional framework may be the way to go. Even so, even using MFC would require you to understand the basic principles of the win32 API while not using it, so you can't be wrong with going MFC-only.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User Terran's Avatar
    Join Date
    May 2008
    Location
    Nashua, NH
    Posts
    100
    i vote for wxWidgets!
    Sorry, but i'm a Code::Blocks man now.

  6. #6
    ---
    Join Date
    May 2004
    Posts
    1,379
    I was under the impression that the Windows API was poorly designed and difficult to use which is why MFC is used kind of like a wrapper.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    MFC does wrap it a lot, but it's way easier and faster than Win32 Api.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    A vote for Qt.

    Free, opensource, cross-platform (write-once-compile-everywhere), natively C++ (unlike GTK).

    I have no experience in WxWidgets, but I have heard wonderful things about it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question - GUIs and Actual Program Design
    By Enoctis in forum C++ Programming
    Replies: 10
    Last Post: 10-03-2005, 08:51 PM
  2. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  3. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  4. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM
  5. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM