Thread: MFc & API

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

    MFc & API

    What's the difference between windows api and MFC which one is better and what's so good about mfc.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    363
    API: Application Program Interface
    MFC: Microsoft Foundation Classes

    The windows api is a set of functions found in dll's scattered over the system that are pretty much the functions all programs in windows have to call inorder to do anything (well atleast anything to do with the window). MFC is a set of classes that pretty much act as an interface to that. They are probbly easier to use (i can't support this statment in any way as i have not tried to use it). Most people recomend learning the API first to give you atleast a basic understanding of whats actually going on inside your program. People who stay with the API mostly like it because they like to know what thier program's doing and don't want to just let microsoft sort it out.

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

    mfc and api

    While the primary purpose of the mfc is to provide a wrapper for the api. It also adds some advantages through some of it's architectural designs such as the document/view architecture.
    If you are going to write programs that require extensive use of common interface controls such as radio buttons, list boxes, edit boxes and so forth... I recommend using the MFC. If however on the other hand you want to build games with direct x or something you will need to use only the api. This is because you will have use direct x to build your graphical interfaces.
    You should build your first windows program copying all the code from scratch using the api from one of the books that have it...
    windows 95 programming for dummies... Charles Petzold's Windows Programming or Windows Game Programming by the game programming gurus.. It will confuse the heck out of you at first but once you understand it... you will never forget it. Once you build that app compare it to building a SDI application through MSVC++ 6.0 wizard. In just a few seconds the wizard builds an app with much more functionality than the plain window you built in around 2 hours.....

    Be warned that while the the MFC wraps much of API, there are many api calls that it does not handle. Knowing the API is helpful know matter how well you know the MFC...

    Good luck and don't give up...
    Manipulating the API or the MFC take months to learn and a years to master.... for most of us anyway....
    zMan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  2. Thread Synchronization :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 08-09-2002, 09:09 AM
  3. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  4. MFC or Windows API
    By aresashura in forum Windows Programming
    Replies: 7
    Last Post: 12-01-2001, 10:21 PM
  5. Difference between MFC and API
    By Garfield in forum Windows Programming
    Replies: 5
    Last Post: 09-23-2001, 06:12 PM