Results 1 to 10 of 10

Thread: What's better to use, MFC or the Win API?

  1. #1

    Thread Starter
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    And, are there any good tutorials for either (besides winprog.org)? I have been looking, but haven't found any good ones.
    Alcohol & calculus don't mix.
    Never drink & derive.

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Which is better depends on what you're doing. MFC makes C++ a bit like VB in that a lot of the Windows stuff is simplified, and you need runtimes to make it work. This is good if you are trying to do rapid development of a fairly standard Windows app, but it's a bit crude and chunky.

    Windows API can do all the stuff MFC can, just in a way that's a little more complicated. With Win32 API you have to write more code yourself, but at the end your code will be more efficient and you'll have less compiled code to your project since it doesn't need runtimes.

    I think it's probably a good idea to learn API stuff first as it gives a better understanding of the way in which Windows programs work.
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  4. #4
    Guest
    I recomend you read the entire tutorial at winprog.org, and download the platform SDK......

  5. #5
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    2 questions,

    1) since we are talking about runtimes, WHY doesn't microsoft include the VB runtimes with windows already? and are the MFC runtimes included already? and if not then why not?

    2) Say you wrote a beta of an application using MFC, and then wanted to convert a later version to API, how hard would that be? Just generally. Would you have to rewrite the entire thing?

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    1) A large proportion of it comes with the latest versions of Internet Explorer, so by definition 98SE and above should support VB6. You can definitely drop msvbvm60.dll from the list, which should save a bit.

    2) Yeah -- it's pretty much a rewrite job. No real way around it, I'm afraid.
    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
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340

    Unhappy

    too bad you would have to rewrite everything

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Well...not everything

    The logic would remain intact, but your application's design may change significantly. Plus you'd have to change CString to string and all the associated containers to their STL equivalents...bit of a nightmare really. Although if it's written in MFC...keep it in MFC -- it would be a lot easier.
    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

  9. #9
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    yeah, i guess before you plan a project you should spend some time thinking about what is best, and then never convert it.

    like the saying "If it's not broken, then don't fix it!"

    anyway, thanks for all the info

  10. #10

    Thread Starter
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Ok, thank you all for the information. The reason I asked for another tutorial was because i have already read the one at winprog.org and i was looking for a one with more information.
    Alcohol & calculus don't mix.
    Never drink & derive.

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