What is MFC?

This is a discussion on What is MFC? within the Windows Programming forums, part of the Platform Specific Boards category; I am learning c++ (doing very good). I hear abouty MFC. Can somone please explain what that is and what ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    27

    What is MFC?

    I am learning c++ (doing very good).

    I hear abouty MFC. Can somone please explain what that is and what it is used for...

    Thank you

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    MFC is the Microsoft Foundation Classes. It's a wrapper to the Windows API, which allows you to create windowed (GUI) programs under MS Windows. It's used by C++'ers to :cough:cheat:cough: their way around using the API. I'm sure a search on google would yeild a better explaination.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Location
    England
    Posts
    121
    MFC allows development of applications much faster and easier than the API, although a degree of understanding of the API is needed to use it. MFC is good for large applications that would otherwise take a long time and a lot of code in API, or for things which interface with databases etc. The disadvantages of MFC are that it makes slower and bigger apps, largely because M$ invented it and it's just their way.

    In an ideal world everything would be API, but development would take a lot longer. (actually in an ideal world we would all use Linux)

    So to some up

    It's used by C++'ers to :cough:cheat:cough: their way around using the API

  4. #4
    Unregistered
    Guest
    MFC, as -Ken- has *coughed* ( ) is Microsoft Foundation Classes and requires ms visual c++.

    It's just a class library and any c++ class library that is well written can improve development time in the right hands. But there is always a steep learning curve involved in their use. So that's one trade-off: the time it takes you to learn the class library fns etc. Another downside of using MFC or other class library as they usually enforce a particular way of doing things that may not suit everyone. Finally their is the factor of code bloat - and use of MFC is VERY guilty of this.

    There are many class libraries available. Some are free. An excellent free class libray to take a look at is VXCL (the virtual X class library):

    http://www.toddtown.com/

    Not only is this library free it's also cross platform ie works on UNIX/linux.

    Some folks recommend learning and using API first; the advantage being that if a class library fails to offer what you need you can always drop back to the API for a solution.

    My personal feelings are: use whatever you are most comfortable with. And MFC sucks.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    75

    MFC

    MFC was invented by microsoft to keep their programmers dumb.

  6. #6
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >MFC was invented by microsoft to keep their programmers dumb.

    Ah, I see. And who did write the MFC?

  7. #7
    Registered User
    Join Date
    Sep 2001
    Location
    England
    Posts
    121
    >Ah, I see. And who did write the MFC?

    Good point.

  8. #8
    CaseY
    Guest

    So,

    so,who creates all the class library? i meant who invented it?
    i am just curious to know it.......why u said mfc makes the programmers dumb? is it because...all the function is avaiable for the programmers.
    see yeah

  9. #9
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> makes the programmers dumb?

    MFC does not make programmers dumb. If anyone believes this to be true, then they can simply choose not to use it!

    For a start, it is not necessary to use MFC, anything you can do in MFC you can do with the API, simply because MFC is just a wrapper around the API.

    MFC is just Microsoft's class library, (there are others, Borland's VCL for example). It enables people who like/need to work with class libraries the capability of doing so. Some employers insist on using it, therefore MFC skills are of use. Generally, on "grey box" type applications, the development time is shorter.

    Where MFC starts to break down is when you want to do some of the more sophisticated thing Windows is capable of doing. With some fooling around, you can make MFC do some of these things, but generally the API is more obviously the correct tool.

    Use it or not. Your choice. I choose not too, other I work with do.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  10. #10
    Registered User
    Join Date
    Jan 2002
    Posts
    27
    move to faq board *cough*

  11. #11
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> move to faq board *cough*

    Okay.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  12. #12
    Registered User
    Join Date
    Dec 2001
    Posts
    104

    Lightbulb VXCL

    So, you think it's possible, if my fortran compiler doesn't have the libraries of the C compiler I'm using, and I want to link my ForTran Program with a simple C program I've written that calls a few Windows API functions; that I could use the equivalent source in the VXCL to create the equivalent Windows API source functions inside my C application? This way my C function would not be dependent on the ForTran Library?
    Last edited by kes103; 01-25-2002 at 12:42 PM.

  13. #13
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Assuming your FORTRAN compiler and C compiler are designed to output object which is linkable with a standard linker to a single .exe, why not?

    The problem you will have to overcome is the differences in calling conventions. Almost invariably, C/C++ passes arguments by value. FORTRAN, normally passes by reference, except with strings which it passes by descriptor.

    Another problem, (and this is from experience - I've had to do this!), is that our FORTRAN compiler and C compilers stored floating point values in a different format - you may need to produce a massaging function to convert from one to the other if you intend passing floats.

    I would suggest you write a couple of C functions and figure out how to call them from FORTRAN, and a couple of FORTRAN function/subroutines and figure out how to call them from a C prog. After that, you should be able to freely intermix your source code.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 09:52 PM
  2. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 07:42 PM
  3. Understanding The Future of MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-15-2002, 10:08 PM
  4. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM
  5. MFC is Challenging :: C++
    By kuphryn in forum C++ Programming
    Replies: 8
    Last Post: 02-05-2002, 01:33 AM

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