View Poll Results: Which is better?

Voters
27. You may not vote on this poll
  • Win32 API

    23 85.19%
  • MFC

    4 14.81%
Results 1 to 20 of 20

Thread: Win32 API vs. MFC

  1. #1
    Sc0rp
    Guest

    Talking Win32 API vs. MFC

    Pretty self-explanatory I guess.
    Go ahead.

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    API!
    Alcohol & calculus don't mix.
    Never drink & derive.

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    API is definetly better, faster but there are things that are real hell to be done just with the API. In these cases MFC is a better choise. Anyway i vote for API.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    MFC is far easier and faster to create, but once you get to some more complicated techniques, getting through to the API can be pain-in-the-ass (BTW can anybody eplain how subclassing in MFC works?)
    I have voted for MFC, but I admit that API can sometimes be the better choice.
    About speed, since mostly MFC apps are working apps written in C++, I don't think speed is all that much an issue. I still can't see any obvious delays.

  5. #5
    New Member
    Join Date
    Jul 2001
    Location
    Sterling Heights, MI, USA
    Posts
    11
    I am fairly new to Win32 programming in C++, but from what I can see, it seems like MFC is similar to the VB runtime. I could be way off base here, but don't you have to include special libraries with your app if you use MFC? Anway, I vote API.

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I vote for API, with my own SMALL static library (about 10K ) to make things easier.
    Originally posted by CornedBee
    MFC is far easier and faster to create, but once you get to some more complicated techniques, getting through to the API can be pain-in-the-ass (BTW can anybody eplain how subclassing in MFC works?)
    I have voted for MFC, but I admit that API can sometimes be the better choice.
    About speed, since mostly MFC apps are working apps written in C++, I don't think speed is all that much an issue. I still can't see any obvious delays.
    CWnd::SubclassWindow I think.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I also vote the API, since it's more "powerfull" and you get rid of those annoying VB like runtime files
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  8. #8
    denniswrenn
    Guest
    I voted for the API, but if I was going to make something big, I'd probably use Borland VCL rather than MFC...

  9. #9
    Sc0rp
    Guest
    So it's API then.

  10. #10
    Megatron
    Guest
    I like API too, but I've heard many people say that when you work with C++ in real life, many compaines demand that you use MFC. Is this true? (I don't know because I've only used VB in the workplace).

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Probably because they didn't know how to write real programs and went for MFC and now they have to maintain it
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  12. #12
    Sc0rp
    Guest
    Hey Kitten, LOL.

    Anyway, I heard the MFC is full of asserts and slows down code drastically.

  13. #13
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think all the ASSERT macros disappear when compiling in release mode.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  14. #14
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252

    Red face Hmmm Hmmm Hmmmm

    I think that the real point with this is the following:
    when you already know a lot of the API and always have been programming with it then the smaller sized and easier looking mfc looks quite strange. You will think why you should learn such a quite different thing when you already know the API. Why learining the same thing twice? Also it's a big issue that the API programmers have worked up their asses for the API and then cheeky MS comes up with its foundation class libs and makes everything that you achieved in long and hard work bloody easy.
    Sure you will then vote for the API. Beginners in my opinion shouldn't even think about starting with the mfc (as well as starting up with vb instead of c, as I did ), because you then get used to it and are too lazy to learn the far more difficult API stuff (and for me c++ from vb).
    When you really get to need it or have to program something crucial for non windows platforms. Would you then like to rewrite all that crap then for API ???
    But i will learn mfc a bit later, already got a book for it which I (luckily) did not touch a lot yet.

  15. #15
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    I say API, but then again, everyone here scared me into not trying MFC.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  16. #16
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Heh, me too
    Alcohol & calculus don't mix.
    Never drink & derive.

  17. #17
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    The ASSERT macros DO disappear in release versions.
    Parksie: I know the function SubclassWindow, I just have no idea how to use it. Do I have to derive a class from CWnd that will handle the messages? How do I use CallWindowProc? It's so damn complicated that I want to use the API, but I need access to the variables of my CView, so I came up with the idea to use a static member function of my CView-derived class as the new message handler for the control. Is this possible???
    About which programs are MFC, there's an easy way to find out. Use the WindowFinder tool and search all the windows and child windows of a program. If there is a single window class named Afx:xxxx (where xxxx are some numbers), the application is guaranteed to be created using MFC.

    All the buzzt
    CornedBee

  18. #18
    Sc0rp
    Guest
    Even if the ASSERTs disappear I still figure that API has a bit less overhead than MFC.

  19. #19
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73

    Fun

    API is DEFINATLY more fun.....

    But it IS annoying....

    And coming from the VB world, MFC can be good sometimes.....

    ::uses API 99% of the time::

  20. #20
    Junior Member
    Join Date
    Jun 2000
    Posts
    28
    yeah api all the way
    I had my programming style foistered on me by my lack of MSDN anyway, meaning the only thing I had was borland's win32.hlp. I suppose that's a good thing, judging by how crap everyone says MFC is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width