Thread: MFC is Challenging :: C++

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    MFC is Challenging :: C++

    Hi.

    I posted a topic regarding GUI programming using C++ a week ago. I was wonder about the best tool to learn GUI programming using C++. Most members said MFC is the best tool to for GUI programming in Windows because of it is from Microsoft. However, many members said Qt is a much easier, and ultimately, more practically GUI tool in windows.

    I bought a MFC book by Jess Prosise and I read the first chapter. I want to said MFC is challenging. First, I like the idea of having inherance and virtual functions and classes to control every specefic GUI feature. However, I am overwhelmed with the number of MFC classes and derived classes. There are too many classes to remember! There is not no way to really know the classes, their member functions, and the parameters for member functions.

    I thought it over and decided to try Qt. From its interface, Qt look much easier than MFC because the GUI items are manageable via drag-drop. The negative side I Qt is *expensive*. It is too expensive (~$2k). Secondly, I do not think the free version Qt 2.3 is not Visual C++ .NET compatible.

    Now I am basically left with MFC. Yes, it is intimidating me right now. I do not have problems with OOP. I am very comfortable with STL and enjoy using it to improve whatever I work on. MFC is different. Prosise present MFC as though I have to know everything about it as well as how Windows programs work. MFC is challenging to learn and implement at first.

    Does it get easier and *faster*?

    I am seriously considering using Borland C++ Builder. It has the RAD feature and I believe the GUI programming is similar to Qt. At least they look similar (drag-drop).

    Kuphryn

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    For creating MS-Windows applications, MFC is great.

    I remember that C++Builder has something called VCL, Visual Component Library, this enables you to create a GUI quite fast.

    A great advantage of C++Builder, in my opinion, was that it put no code between my own code. Visual C++ used to put MFC code all around. But perhaps there's an option in Visual C++ which supresses the displaying of MFC code. Haven't looked for that.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Thanks.

    I hear two sides including MFC is bloated and MFC is powerful once the developer learns its working. Both sounds valid.

    One thing I see is MFC developers like MFC, while developers that user other GUI tools and/or are in the process of learning MFC seem criticize it. Both situations are understandable.

    As I this topic reads, I find MFC challenging mainly because there are many specific "tweaks," which are difficult for a beginner to learn, design around, and implement.

    As I said before, I will definitely go through this process and learn MFC. I will give all I got into Prosise book. My goal is to first finish reading the book. My goal is to gain as much insight as I possibly can throughout the process. It will take some time, but very doable.

    Are there some tips you have for gaining the most insights as possible during the process of learning MFC? I learning C++ quick. I can certainly apply the same technique I used throughout the process of learning C++.

    Thanks,
    Kuphryn

  4. #4
    Barjor
    Guest
    I like MFC alot. There is no way you will remember all of it but you should get used to use the MSDN help. All info you need is in there. I think the best way to learn it is to play with it, build apps and look things up as you go.
    ~Barjor

  5. #5
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    I agree with Barjor. MFC consists of a large collection of classes which can do a lot of things for you. The best way to learn how to apply the MFC efficiently is by using it. Create applications and try to understand what's going on.

    There's a lot of info around on the internet. And ofcourse placing questions and reading threads on the boards here will supply you with valuable knowledge and insights.

  6. #6
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    MFC

    I have been working with MFC for about a year now at a professional level and I can say this...

    learning MFC is a recursive process. The more you know the easier it is to digest new concepts. Each time you learn new concepts you get a better understanding of previously learned concepts. And make sure you load all your MSDN help files on your harddrive as you will use them quite frequently.
    Whenever you see a good code sample somewhere snatch it up and save it or when you need it you will find help nowhere.
    zMan

  7. #7
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    I know this is gonna sound dumb, but what does MFC stand for? Why is it better than API? How do you compile it and where do you learn it?

  8. #8
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    I know this is gonna sound dumb, but what does MFC stand for? Why is it better than API? How do you compile it and where do you learn it?
    MFC stands for Microsoft foundation classes. It is not better than win32api. But it is faster to code. You can do in a day with mfc what might take you a week in pure api. The penalty is code bloat and slight performance overhead. MFC is available on microsoft visual c compiler. I believe borland has tried to implement it to but it wasn't implemented by them the last time i used a borland compiler (4.5). The above mentioned book....

    Programming windows with mfc by jeff Prosise

    is an excellent starting point.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  9. #9
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    In .NET, if you are going to use C#, it's becoming really simple. Comparable to Borland.

    >There is not no way to really know the classes, their member
    >functions, and the parameters for member functions.

    Exactly. No one can know it all, but wise people invented the helpfile to look it up when needed. All you need is a single clue where to start looking. If you need file access, all you need to know is the classname CFile. From there you can see all linked topics, methods, samples and so on.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC Controls and Thread Safety :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 12-06-2002, 11:36 AM
  2. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  3. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 06:42 PM
  4. Understanding The Future of MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-15-2002, 09:08 PM
  5. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM