MFc & API

This is a discussion on MFc & API within the C++ Programming forums, part of the General Programming Boards category; What's the difference between windows api and MFC which one is better and what's so good about mfc....

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.

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....