I think i've covered most of the things in C++ and planning on moving to MFC.
What this are a MUST in MFC and what things will help?
I think i've covered most of the things in C++ and planning on moving to MFC.
What this are a MUST in MFC and what things will help?
NOOOOOO!
Forget MFC. Learn windows API and write your own classes that suit your needs. Its a great learning exercise. For some examples have a look at Kens site .
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
i completely agree... MFC is hated
I've had a little taste of Win32 but it seems too much coding and a lot of it just doesn't make much sence.
MFC seems to be a lot shorter and well doesn't make much sence but then again i haven't really read anything about it.
I haven't used MFC. I assume, like the WinAPI, it's like learning a new programming language... So, you don't need to know that much standard C++ to use it. To use the API, you mainly need to understand variables, (including constants & typedefs), pointers, structures, functions, and loops. I'm not sure if you need a good understanding of classes to use MFC.
MFC will save you a ton of time over straight API. It does similar for C++ what VB does for BASIC. The learning curve is a bit steep at first. Check out codeproject dot com.
MFC will help you write window gui applications.I think i've covered most of the things in C++ and planning on moving to MFC.
What this are a MUST in MFC and what things will help?
You'll probably want to use standard C++ for most of your application. The use of the library itself isn't standard, but is epected. And, whether you want to use std::string or CString, std::vector, std::list, std::deque or the MFC alternatives, is up to you. I'd learn to use CString because of the unicode support. The other containers MFC offers are awkard compared to the STL, and probably aren't worth learning unless if a lot of code is written using them.I assume, like the WinAPI, it's like learning a new programming language... So, you don't need to know that much standard C++ to use it.
Yes, you'll need to know about classes. A lot of the message handler stuff can be done within the app wizard.To use the API, you mainly need to understand variables, (including constants & typedefs), pointers, structures, functions, and loops. I'm not sure if you need a good understanding of classes to use MFC.
You can actually get away with very little formal C++ OOP knowledge. IMO, that is one of the down sides. MFC has been criticized often because it disregards many of the conventions of object oriented programming to make it easier to squeeze out running code quickly. So in reference to the statement that you need to know about classes, yes, but not for the reasons one may initially think.Originally Posted by okinrus
I have used MFC many times in the past because the message map macros alone provide a significant reduction in the number of lines of code I need to write. I can knock out a functional GUI using MFC almost as fast as I can using VB. I hate writing VB code. MFC gives me the same advantages (almost) as VB, and I can write code in my preferred language. I try to make my code as robust as I can, but there isn't much I can do about the framework code.
For anyone starting out learning MFC, I recommend digging right into the message maps. Read the Technotes and everything you can find in MSDN pertaining to message handling. Once you have a grasp on how the message pump and message map macros work you're 66.6% of the way to having MFC mastered.
-Rog
Then expect MFC to completely bamboozle you. There are so many gaps in the classes available that often you will need to know the API anyway to accomplish what you want in MFC. So even if you do have your heart set on learning MFC then I would always start first with the API. Get Petzold's programming windows and work through that and then you are ready for Richter's advanced windows programming. Once you have mastered what Richter shows you then you can move on confidently to MFC though by then I doubt you would want to anymore. Prosise's programming windows with MFC is a good book for MFC. MFC is not the shortcut to windows programming that many believe it is due to such crap works as learn visual c++ in 21 days.I've had a little taste of Win32 but it seems too much coding and a lot of it just doesn't make much sence.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Understanding the semantics of C++ classes is almost essential to use a library with C++ classes.You can actually get away with very little formal C++ OOP knowledge.
MFC's message system creates unexpected behavior because non-mfc programmers are used to designing their classes and then extending them using virtual methods. MFC, however, uses it's own message system, although the MFC docs try to justify it.MFC has been criticized often because it disregards many of the conventions of object oriented programming to make it easier to squeeze out running code quickly.