View Poll Results: Which do you think is the easiest way to get into GUI development?

Voters
5. You may not vote on this poll
  • WinAPI

    4 80.00%
  • MFC

    0 0%
  • C++/CLI

    0 0%
  • C#

    1 20.00%

Thread: Easiest way to help a friend learn GUI programming?

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    1,619

    Easiest way to help a friend learn GUI programming?

    As the title says, I'm trying to teach a friend (who is very familiar with C++ but not with WinAPI or any GUI development) an easy way to do GUI work.

    My thoughts:

    MFC - I know this best myself, but it's not always intuitive and he hates the mountains of auto-generated code.

    WinAPI - I know this too, and I don't like it, it's too much code for simple tasks. Ideally it's something to know in the long run but for quickly making GUI apps, this seems like reinventing the wheel, repeatedly.

    C++/CLI - don't know this at all but could learn. I've heard it makes GUI development easy. Learning new languages is easy for us both, as we both know many already.

    C# - Same comments as C++/CLI


    Right now we're both using VS .NET 2003 Pro so we can't do C++/CLI but we both have cheap sources of .NET 2005 from academic licensing so that's not going to be a real issue.
    Last edited by Cat; 10-18-2006 at 04:16 PM.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  2. #2
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Secret option number 5: wxWidgets...

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Or Qt or GTK ...

    If it's really about creating GUIs fast, I'd go for C#. Sure, you have to learn a new language, but for me, learning C# (with knowledge of C++ and Java) was a matter of about an hour.

    C++/CLI I despise for no particular reason. But keep everyone who isn't very sure-footed in C++ away from it, as it tends to confuse these people.

    Qt requires a weird build setup and the free version only works with MinGW, I think.

    GTK-- is an option. It's the C++ wrapper around GTK+. It's rather simple to use, in my limited experience.

    wxWidgets is similar in style to MFC, but less boilerplate, I think, and differing more from Win32. But you should be able to pick it up pretty quickly. Not sure how well-suited it is for RAD, though.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    You can't really compare WinAPI to wrappers.
    WinAPI is the ONLY way how your program can communicate with Windows (there are some few interrupts).
    If you use a wrapper you have to understand that there are always some losses of functionality.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  5. #5
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    Java is pretty easy if you know C# or C++. And the GUI libraries are easy to use and are also cross-platform.

    However if you're going to do serious Windows programming, I say start with the Windows API, then learn a wrapper if you must. But wrappers are usually not free or carry a lot of baggage or even both.

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by maxorator
    You can't really compare WinAPI to wrappers.
    Sure you can. You just need to factor in the loss of functionality.

    WinAPI is the ONLY way how your program can communicate with Windows (there are some few interrupts).
    You make it sound like the wrappers are completely non-functional. Since they call upon the Win32 API, they are of course a perfectly good way of communicating with Windows.
    (By the way, not every API call ultimately leads to an interrupt. Just those that communicate with the kernel. I'm pretty sure the window manager is mostly running in user space.)

    If you use a wrapper you have to understand that there are always some losses of functionality.
    True. The questions are:
    1) Do I need the functionality I lost? For example, do I care that my wrapper provides no way of finding out whether XP is running in themed mode, and what theme it uses? Unless you need to adapt your own drawing code to integrate well into the system (like Mozilla does), the answer to that is no.
    2) Is the shorter development time and the possible cross-platform compatibility worth the loss?
    3) How hard is it to call directly into the API for just the few things where the wrapper lacks?
    4) How hard is it to extend the wrapper to provide this functionality?

    MFC, for example, places just about no barrier at all between the programmer and the raw API. Most wrappers provide some way of getting at the underlying native handles.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with friend class declaration in a namespace
    By Angus in forum C++ Programming
    Replies: 2
    Last Post: 12-09-2008, 01:29 PM
  2. compiler doesn't recognize my friend
    By pheres in forum C++ Programming
    Replies: 6
    Last Post: 12-05-2008, 11:10 AM
  3. Replies: 4
    Last Post: 02-21-2006, 06:33 PM
  4. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 08: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