I'm fairly new to MS VC++, just got it a few days ago.
I've learned a bit about Borland C++, but now..it's MS VC++'s turn.
And for my first question...
What is MFC?
Printable View
I'm fairly new to MS VC++, just got it a few days ago.
I've learned a bit about Borland C++, but now..it's MS VC++'s turn.
And for my first question...
What is MFC?
MFC(Microsoft Foundation Class) is a kind of library that has lots of built is classes to simplify the programming in C++.
-- MFC is ****, and crap
I suggest that you learn raw API rather than learning MFC!:D
Somebody else may describe MFC better than me... so let us see ;)
From the VC++ 6 helpfile:
Still, I suggest that you use API instead of MFC.Quote:
The Microsoft Foundation Class Library (MFC) is an "application framework" for programming in Microsoft Windows. Written in C++, MFC provides much of the code necessary for managing windows, menus, and dialog boxes; performing basic input/output; storing collections of data objects; and so on. All you need to do is add your application-specific code into this framework. And, given the nature of C++ class programming, it's easy to extend or override the basic functionality the MFC framework supplies.
The MFC framework is a powerful approach that lets you build upon the work of expert programmers for Windows. MFC shortens development time; makes code more portable; provides tremendous support without reducing programming freedom and flexibility; and gives easy access to "hard to program" user-interface elements and technologies, like Active technology, OLE, and Internet programming. Furthermore, MFC simplifies database programming through Data Access Objects (DAO) and Open Database Connectivity (ODBC), and network programming through Windows Sockets. MFC makes it easy to program features like property sheets ("tab dialogs"), print preview, and floating, customizable toolbars.
I highly reccommend staying with raw API. It's more fun :D
(haha! we will convert you from vb! :D )
To sum it up, MFC does all the dirty/behind the scenes work for you. The disadvantage of it is that you have to carry around those awful DLLs, and as SteveCRM mentioned, some find it more "fun" to work with raw API instead.
You'd have to be a geek to find it funny though ;)
The thing about MFC is - yeah, some bits of it are okay on their own though - you're forced into a "document/view" model by the wizard, which in a lot of cases is neither wanted, nor the most effective model for your program. I've not tried it, but using CWnd and it's derived classes directly from WinMain might be a useful thing to do (statically linked, of course ;))
I just got through teaching the MFC section course in C++ for MSCD.
Unless you want to emulate Petzold and write about 2500 lines of C to get an absolutely bare-bones Windows app going, stick with MFC.
For the guys who like low-level programming, I'd suggest learning to write drivers. You'll make more money. Seriously. There are lots of System Programming jobs going begging. If you can write network drivers for NT, you're gonna make $US100K. Right Now.
No business-oriented commercial shop will code for Windows in C++ without MFC. They don't hire cowboy programmers using only api's. System programming is another story.
Parksie is right about the Doc/View model - it is a lot of trouble.
More trouble than it's worth. On the other hand, CString, CException, or CDialog are all a breeze.
There isn't a happy middle ground, either you MFC and work for CitiBank, or you work for Blizzard --- if and only if you're REALLY good.
Perhaps *some* of us dont do it for money?
If we compare with Visual Basic, MFC is like the functions attach with any visual basic program (the msgbox function and the others). You can't do without, but it's easier with it...
Team -
You will some day. McBurgers salary ranges don't support 3 kids + wife.
I couldn't disagree more. sorry :rolleyes:Quote:
Originally posted by jim mcnamara
No business-oriented commercial shop will code for Windows in C++ without MFC. They don't hire cowboy programmers using only api's.
2500 lines for a bare bones windows app? What are you writing? I made a checkers game in windows with only about 450 lines.
You can make a bare win32 program with very little code. See my example program...say it with me, people...
www.parksie.net/Raw.zip :D
you should give people a site with that link on it, see how many hits it gets :p
Lol yeah, and also how many people don't have the PSDK and complain about my code...YEAH *****!!!
Well I still can't see that stupid dialog example because of you and your stupid UK english!!!!!!!!! :D :p
HAHAHAHAHA :D
Shouldn't use US English :p Seriously, I can't see why it refuses - mine loads US, UK, Ozzie, everything (including German, French, etc.),