Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. win32 or MFC

win32 or MFC

Scheduled Pinned Locked Moved The Lounge
c++question
15 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    I agree with the other replys which say that MFC makes it *much* easier to create GUI-intensive applications. However, sometimes you need your .exe to be as small and fast as possible and have as few external file dependencies as possible. IMHO, in those cases, "old school" WIN-API programming simply cannot be beat.

    C Offline
    C Offline
    Chris Maunder
    wrote on last edited by
    #6

    I'm surprised no one has mentioned WTL ...or even Windows Forms :-D cheers, Chris Maunder

    A 1 Reply Last reply
    0
    • C Chris Maunder

      I'm surprised no one has mentioned WTL ...or even Windows Forms :-D cheers, Chris Maunder

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #7

      Windows Forms, hmmm, I would never mention those before VS7 (.NET) is released... - Anders

      1 Reply Last reply
      0
      • L Lost User

        okay a simple question which one is better and in what sense

        M Offline
        M Offline
        Mike Stevenson
        wrote on last edited by
        #8

        I have had this tugging feeling to ditch MFC recently. I never was a Win32 programmer, and had a hard time understanding plain Win32 in the beginning (I came through the ranks with BASIC->VB->Java->MFC). Now that I've been using MFC for a few years, I have started to realize that much of what I use in MFC is a (very) thin wrapper around Win32. I don't use Doc/View very often at all, and I would never use MFCs COM classes. Most of what I program are utilities. Also, I'm a shareware developer and I'm getting sick of the bloat that MFC brings with it (the same reason I left VB). I do think that, before I go completely to Win32, I will look at WTL closely to see how it works. It's my understanding that WTL provides an implementation similar to the GUI side of MFC, but without the Doc/View and without the bloat. (Yay, I hope!) -Mike Stevenson Owner, Liquid Mirror Software (http://www.liquidmirror.com) Owner, Shareware Junction (http://www.sharewarejunction.com) Owner, Internet Shopping Spree (http://www.internetshoppingspree.com/) Owner, I Hate Metallica (http://www.ihatemetallica.com/) CoderX@liquidmirror.com **************************************************** Get AnyWhere 5 Now! Copy, move and zip files, easy as one right click! http://www.liquidmirror.com/ ****************************************************

        L 1 Reply Last reply
        0
        • L Lost User

          okay a simple question which one is better and in what sense

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #9

          MFC is better. because you can learn the good and the worst in class design. :eek:

          W 1 Reply Last reply
          0
          • M Mike Stevenson

            I have had this tugging feeling to ditch MFC recently. I never was a Win32 programmer, and had a hard time understanding plain Win32 in the beginning (I came through the ranks with BASIC->VB->Java->MFC). Now that I've been using MFC for a few years, I have started to realize that much of what I use in MFC is a (very) thin wrapper around Win32. I don't use Doc/View very often at all, and I would never use MFCs COM classes. Most of what I program are utilities. Also, I'm a shareware developer and I'm getting sick of the bloat that MFC brings with it (the same reason I left VB). I do think that, before I go completely to Win32, I will look at WTL closely to see how it works. It's my understanding that WTL provides an implementation similar to the GUI side of MFC, but without the Doc/View and without the bloat. (Yay, I hope!) -Mike Stevenson Owner, Liquid Mirror Software (http://www.liquidmirror.com) Owner, Shareware Junction (http://www.sharewarejunction.com) Owner, Internet Shopping Spree (http://www.internetshoppingspree.com/) Owner, I Hate Metallica (http://www.ihatemetallica.com/) CoderX@liquidmirror.com **************************************************** Get AnyWhere 5 Now! Copy, move and zip files, easy as one right click! http://www.liquidmirror.com/ ****************************************************

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #10

            Ahh, finally someone in this thread with whom I agree completely. I have had similar programming experience, and a similar reaction to MFC. I actually started with OWL, but I don't remember that very well. Anyway, the MFC wrapper is definitely thin enough in places that often times it's merely a matter of ::LineTo(dc,x,y) vs. dc->LineTo(x,y). I still use mostly MFC now (sometimes ATL), but probably see the benefit of only a few features, such as message maps, CSocket, and debugging benefits (I actually couldnt really tell you what debugging features are MFC's and which are MSVC's). One of my gripes with MFC is that decided to have its own container classes, such as CList, CString, CPtrArray, etc., when the STL had already created list, vector, basic_string, etc., which I have found to be more useful and generally more type safe. If anyone knows why ms implemented its own container classes for mfc please let me know. But when all is said and done, MFC seems to be sufficently stable, reasonably intuitive, and quite possibly reduces production time in many projects. Also, I would think that a novice programmer might be more intimidated by win32 api than by mfc.

            S 1 Reply Last reply
            0
            • L Lost User

              Ahh, finally someone in this thread with whom I agree completely. I have had similar programming experience, and a similar reaction to MFC. I actually started with OWL, but I don't remember that very well. Anyway, the MFC wrapper is definitely thin enough in places that often times it's merely a matter of ::LineTo(dc,x,y) vs. dc->LineTo(x,y). I still use mostly MFC now (sometimes ATL), but probably see the benefit of only a few features, such as message maps, CSocket, and debugging benefits (I actually couldnt really tell you what debugging features are MFC's and which are MSVC's). One of my gripes with MFC is that decided to have its own container classes, such as CList, CString, CPtrArray, etc., when the STL had already created list, vector, basic_string, etc., which I have found to be more useful and generally more type safe. If anyone knows why ms implemented its own container classes for mfc please let me know. But when all is said and done, MFC seems to be sufficently stable, reasonably intuitive, and quite possibly reduces production time in many projects. Also, I would think that a novice programmer might be more intimidated by win32 api than by mfc.

              S Offline
              S Offline
              Simon Capewell
              wrote on last edited by
              #11

              MFC was around before STL, so the container classes were a good thing. Now they muddy the water - do you stick with MFC since the rest of your team understand it and you code remains consistent, or press ahead and use the more powerful STL stuff? In some cases it's better to use the MFC implementations. One example is large maps. With CMap you can initialise the hash table and use a custom hashing algorithm, whereas std::map doesn't support this. In a map with 10000 items std::map can be an order of magnitude slower - yow!You could buy a more up to date stl implementation that has std::hash_map, or you could moan to Microsoft for not keeping their STL up to date :mad:

              W 1 Reply Last reply
              0
              • S Simon Capewell

                MFC was around before STL, so the container classes were a good thing. Now they muddy the water - do you stick with MFC since the rest of your team understand it and you code remains consistent, or press ahead and use the more powerful STL stuff? In some cases it's better to use the MFC implementations. One example is large maps. With CMap you can initialise the hash table and use a custom hashing algorithm, whereas std::map doesn't support this. In a map with 10000 items std::map can be an order of magnitude slower - yow!You could buy a more up to date stl implementation that has std::hash_map, or you could moan to Microsoft for not keeping their STL up to date :mad:

                W Offline
                W Offline
                Walter Sullivan
                wrote on last edited by
                #12

                In VC7 we have hash_map...:-D Sorry its not there already. Walter Sullivan Program Manager, ATL/MFC

                S 1 Reply Last reply
                0
                • L Lost User

                  MFC is better. because you can learn the good and the worst in class design. :eek:

                  W Offline
                  W Offline
                  Walter Sullivan
                  wrote on last edited by
                  #13

                  Ouch! I'm sure you like the pieces I designed...;^) Walter Sullivan Program Manager, ATL/MFC

                  1 Reply Last reply
                  0
                  • W Walter Sullivan

                    In VC7 we have hash_map...:-D Sorry its not there already. Walter Sullivan Program Manager, ATL/MFC

                    S Offline
                    S Offline
                    Simon Capewell
                    wrote on last edited by
                    #14

                    Excellent! Is STL still licensed from Dinkumware?

                    W 1 Reply Last reply
                    0
                    • S Simon Capewell

                      Excellent! Is STL still licensed from Dinkumware?

                      W Offline
                      W Offline
                      Walter Sullivan
                      wrote on last edited by
                      #15

                      Yes, it is. Walter Sullivan Lead Program Manager, ATL/MFC

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups