Results 1 to 17 of 17

Thread: Mfc

  1. #1
    Matthew Gates
    Guest

    Question 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?

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    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!

    Somebody else may describe MFC better than me... so let us see
    Baaaaaaaaah

  3. #3
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    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.
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I highly reccommend staying with raw API. It's more fun



    (haha! we will convert you from vb! )

  5. #5
    Megatron
    Guest
    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.

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

  7. #7
    jim mcnamara
    Guest
    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.

  8. #8
    Member
    Join Date
    Mar 2001
    Posts
    60

    Reply

    Perhaps *some* of us dont do it for money?
    What is Life? One big dream or one Big nightmere.

  9. #9
    Addicted Member
    Join Date
    May 2001
    Location
    Québec, Canada
    Posts
    131
    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...
    Khavoerm Irithyl

  10. #10
    jim mcnamara
    Guest
    Team -

    You will some day. McBurgers salary ranges don't support 3 kids + wife.

  11. #11
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    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

  12. #12
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    2500 lines for a bare bones windows app? What are you writing? I made a checkers game in windows with only about 450 lines.

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

  14. #14
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    you should give people a site with that link on it, see how many hits it gets

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

  16. #16
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    Well I still can't see that stupid dialog example because of you and your stupid UK english!!!!!!!!!

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



Click Here to Expand Forum to Full Width