Thread: Why MFC when you can just use API?

  1. #16
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    >> don't care how or why the API works - it just does. <<

    You see, I think that is the wrong attitude. The more you know about whatever you are learning about (API in this case), the better you learn it. And if that requires learning and implementing the core API, then so be it.

    --Garfield
    1978 Silver Anniversary Corvette

  2. #17
    Unregistered
    Guest
    As a general observation, it does take more code to write a windows app using pure API functions as opposed to using MFC. MFC wraps the Windows API with objects. I find using the CScrollBar class in MFC much easier/quicker then using API functions to achieve the same result.

    However, just because a programmer decides to create some app using MFC, doesn't mean he won't be using the API. There are things that MFC simply can't do with it's classes, or it wasn't practicle to create a class for. In this case, you must use the API.
    ( By the way... please please please.. use the scope resoluter when you call API functions from within an MFC app).

    I've found that most of the programs written where I work are written in the Windows API. We have a few MFC apps, and they are much easier to maintain, and took much less time to code.

  3. #18
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    I don't understand why people are rushing to write apps. Take your time and make an application from powerful, core API.

    I have time. I want to work with the API.

    --Garfield
    1978 Silver Anniversary Corvette

  4. #19
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Time is money. I agree that it is nice to know the API. But it is faster to get the same result using a library. This could either be your own ( unsupported, takes time to write and no-one else knows it ) or a lib like MFC.

    When you work for someone else, you are likely to get paid per timeunit, being it hour, day or month. And your employer will be quite displeased if you don't get the maximum result out of the given and paid time. If you are on your own and have time to waste, then it's totally up to you what you do with it.
    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.

  5. #20
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    I think MFC code is harder to read than API code, but that's just me.
    // Gliptic

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