|
Thread: Mfc
-
Jul 24th, 2001, 11:59 PM
#1
Mfc
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?
-
Jul 25th, 2001, 12:55 AM
#2
-
Jul 25th, 2001, 05:52 AM
#3
Frenzied Member
From the VC++ 6 helpfile:
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.
Still, I suggest that you use API instead of MFC.
-
Jul 25th, 2001, 06:09 AM
#4
Frenzied Member
I highly reccommend staying with raw API. It's more fun 
(haha! we will convert you from vb! )
-
Jul 25th, 2001, 09:36 AM
#5
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.
-
Jul 25th, 2001, 11:38 AM
#6
Monday Morning Lunatic
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 refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jul 25th, 2001, 07:07 PM
#7
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.
-
Jul 25th, 2001, 07:25 PM
#8
Member
Reply
Perhaps *some* of us dont do it for money?
What is Life? One big dream or one Big nightmere.
-
Jul 25th, 2001, 08:39 PM
#9
Addicted Member
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...
-
Jul 25th, 2001, 09:01 PM
#10
Team -
You will some day. McBurgers salary ranges don't support 3 kids + wife.
-
Jul 26th, 2001, 10:19 AM
#11
Guru
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.
I couldn't disagree more. sorry
-
Jul 26th, 2001, 01:02 PM
#12
Frenzied Member
2500 lines for a bare bones windows app? What are you writing? I made a checkers game in windows with only about 450 lines.
-
Jul 26th, 2001, 01:26 PM
#13
Monday Morning Lunatic
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
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
-
Jul 26th, 2001, 01:34 PM
#14
Frenzied Member
you should give people a site with that link on it, see how many hits it gets
-
Jul 26th, 2001, 01:46 PM
#15
Monday Morning Lunatic
Lol yeah, and also how many people don't have the PSDK and complain about my code...YEAH *****!!!
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
-
Jul 26th, 2001, 02:05 PM
#16
Frenzied Member
Well I still can't see that stupid dialog example because of you and your stupid UK english!!!!!!!!!
-
Jul 26th, 2001, 02:09 PM
#17
Monday Morning Lunatic
HAHAHAHAHA 
Shouldn't use US English Seriously, I can't see why it refuses - mine loads US, UK, Ozzie, everything (including German, French, etc.),
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|