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 and MFC

Win32 and MFC

Scheduled Pinned Locked Moved The Lounge
c++jsonquestionloungelearning
20 Posts 13 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.
  • S Stan Shannon

    If you appreciate the value of OOP and C++ than it would be foolish to totally ignore MFC. There is a great deal there that can tremendously increase application development speed. Having said that, I will also say that I do as much coding in straight win32 and "standard" C++ as possible. "But, daddy, that was back in the hippie ages..." My twelve year old son - winning the argument. "Stan, you are an intelligent guy who responds in meaningful ways" Paul Watson 16/10/01

    T Offline
    T Offline
    Todd Smith
    wrote on last edited by
    #8

    What does OOP have to do with MFC? :)

    Todd Smith

    S 1 Reply Last reply
    0
    • T Todd Smith

      What does OOP have to do with MFC? :)

      Todd Smith

      S Offline
      S Offline
      Stan Shannon
      wrote on last edited by
      #9

      LOL. Well, sometimes if you squeeze MFC hard enough, you can get a drop or two of OOP out of it. "But, daddy, that was back in the hippie ages..." My twelve year old son - winning the argument. "Stan, you are an intelligent guy who responds in meaningful ways" Paul Watson 16/10/01

      1 Reply Last reply
      0
      • W Waleed Eissa

        Hi all, Just out of curiosity, how many of you don't like MFC? I prefer using Win32 API to MFC .. well, in general I hate wrappers. With all my respect to MFC, it seems too mysterious for me. May be because I'm a kind of person that prefers to know how things are working not just use them "as is". Believe it or not, I find Win32 much easier than MFC - even though I'm a beginner.

        M Offline
        M Offline
        Michael P Butler
        wrote on last edited by
        #10

        MFC is my preferred choice for writing the day to day business applications. For my COM components that have a visual interface then I use the WTL wrappers. I also have my own little wrapper around the Win32 API for when I'm writing a game or some other small applications. It isn't very often that I use the Win32 without some kind of class library. I hate reinventing the wheel. Michael :-)

        1 Reply Last reply
        0
        • W Waleed Eissa

          Hi all, Just out of curiosity, how many of you don't like MFC? I prefer using Win32 API to MFC .. well, in general I hate wrappers. With all my respect to MFC, it seems too mysterious for me. May be because I'm a kind of person that prefers to know how things are working not just use them "as is". Believe it or not, I find Win32 much easier than MFC - even though I'm a beginner.

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

          I started with MFC in 1995 but my love affair is now over thanks to WTL. I have started using WTL for new projects and it is a joy to use, creating small apps with no MFC dependencies. I can't believe that more people don't use WTL - it really is the way forward for client apps (forget .NET for now - I'm talking about classic applications that can run on anything form Win95 to XP). I spent many years before C++/MFC using C/WinAPI, so using WTL is still more productive than classic Win32 programming (there are a lot of excellent classes and templates buried in those header files). I think a number of things put people off using WTL - I'd never really done much template programming for example, and I guess many MFC programmers haven't done much Win32 API stuff. I bought an excellent book on the C++ STL and template programming and haven't regretted it. WTL has everything most MFC programmers need. Anyone else made the move to WTL?

          M M 2 Replies Last reply
          0
          • L Lost User

            I started with MFC in 1995 but my love affair is now over thanks to WTL. I have started using WTL for new projects and it is a joy to use, creating small apps with no MFC dependencies. I can't believe that more people don't use WTL - it really is the way forward for client apps (forget .NET for now - I'm talking about classic applications that can run on anything form Win95 to XP). I spent many years before C++/MFC using C/WinAPI, so using WTL is still more productive than classic Win32 programming (there are a lot of excellent classes and templates buried in those header files). I think a number of things put people off using WTL - I'd never really done much template programming for example, and I guess many MFC programmers haven't done much Win32 API stuff. I bought an excellent book on the C++ STL and template programming and haven't regretted it. WTL has everything most MFC programmers need. Anyone else made the move to WTL?

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #12

            Robert Edward Caldecott wrote: Anyone else made the move to WTL? *raises hand* Me! :) Before I forced myself to learn ATL and its windowing classes, I did most UI stuff in MFC because I know it, and know it well enough to where I could hack a message map or stick in an undocumented macro if I needed to tweak things. Oh and of course CString. Once I got into ATL, I started using it for dialogs. Then WTL came along and it provides me with all the UI stuff I need, dialogs, common control wrappers, message cracking macros, DDX, resizable dialogs. And CString! ;) Nowadays any little utility I write (like my hotfix checker, new version 2 is in the works btw!) is done in WTL. Luckily the class names are similar enough to MFC, and have just enough comments in the header files, to where I can find stuff without too much trouble. --Mike-- http://home.inreach.com/mdunn/ While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate. :love: your :bob: with :vegemite: and :beer: Sonork - 100.10414 AcidHelm

            1 Reply Last reply
            0
            • L Lost User

              I started with MFC in 1995 but my love affair is now over thanks to WTL. I have started using WTL for new projects and it is a joy to use, creating small apps with no MFC dependencies. I can't believe that more people don't use WTL - it really is the way forward for client apps (forget .NET for now - I'm talking about classic applications that can run on anything form Win95 to XP). I spent many years before C++/MFC using C/WinAPI, so using WTL is still more productive than classic Win32 programming (there are a lot of excellent classes and templates buried in those header files). I think a number of things put people off using WTL - I'd never really done much template programming for example, and I guess many MFC programmers haven't done much Win32 API stuff. I bought an excellent book on the C++ STL and template programming and haven't regretted it. WTL has everything most MFC programmers need. Anyone else made the move to WTL?

              M Offline
              M Offline
              Michael P Butler
              wrote on last edited by
              #13

              I've not got round to writing a full blown app in WTL yet. I use it all the time in my ATL com objects. I have a couple of up and coming personal projects that I am tempted to use it in though. I do like WTL more than MFC but having done MFC for 8 years, I find I'm still more productive in MFC. Michael :-)

              L 1 Reply Last reply
              0
              • M Michael P Butler

                I've not got round to writing a full blown app in WTL yet. I use it all the time in my ATL com objects. I have a couple of up and coming personal projects that I am tempted to use it in though. I do like WTL more than MFC but having done MFC for 8 years, I find I'm still more productive in MFC. Michael :-)

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

                Productivity is bound to take a hit at first, but once you have knocked out a few smallish apps it starts to come together. I started playing with WTL in my spare time, converting a few existing dialog based MFC apps in order to get a feel for the new classes, etc. I found it took longer for me to get to grips with STL and templates than it did to work out how the new WTL UI classes worked. Of course, you can use WTL without having to drag in the STL (CSimpleArray, CSimpleValArray, etc.). Once I became familiar with syntax of C++ templates, it made WTL easier to learn. My only gripe is the lack of support in the MSVC IDE for WTL. Support for WTL message maps, DDX, etc. would be great. I suppose it's too much to assume that MS have actually done something about this in the .NET IDE?

                M 1 Reply Last reply
                0
                • L Lost User

                  Productivity is bound to take a hit at first, but once you have knocked out a few smallish apps it starts to come together. I started playing with WTL in my spare time, converting a few existing dialog based MFC apps in order to get a feel for the new classes, etc. I found it took longer for me to get to grips with STL and templates than it did to work out how the new WTL UI classes worked. Of course, you can use WTL without having to drag in the STL (CSimpleArray, CSimpleValArray, etc.). Once I became familiar with syntax of C++ templates, it made WTL easier to learn. My only gripe is the lack of support in the MSVC IDE for WTL. Support for WTL message maps, DDX, etc. would be great. I suppose it's too much to assume that MS have actually done something about this in the .NET IDE?

                  M Offline
                  M Offline
                  Michael P Butler
                  wrote on last edited by
                  #15

                  Robert Edward Caldecott wrote: My only gripe is the lack of support in the MSVC IDE for WTL. Support for WTL message maps, DDX, etc. would be great. I suppose it's too much to assume that MS have actually done something about this in the .NET IDE? As Microsoft still regard WTL as unofficial and not-supported, I don't think we'll be seeing WTL intergrated into VC++ 7 IDE. A shame, as I think they have a rather nice framework on their hands which more developers would start to use if it had better tools support. Michael :-)

                  1 Reply Last reply
                  0
                  • L Luis Alonso Ramos

                    Hello, I also prefer Win32 API over MFC. MFC has its own advanteages, such as faster development of functionality common to all apps (toolbars, windows, dialog boxes, and so on), but it's way too bloated. Maybe if there were a stripped-down of MFC (mmm how about WTL?? I haven't used it but I've read about it, and it looks good), it would be better!! Cheers, -- LuisR -------- Luis Alonso Ramos Chihuahua, Mexico www.luisalonsoramos.com

                    R Offline
                    R Offline
                    realJSOP
                    wrote on last edited by
                    #16

                    Luis Alonso Ramos wrote: MFC has its own advanteages, such as faster development of functionality common to all apps (toolbars, windows, dialog boxes, and so on), but it's way too bloated. That's a load of cat dung. "Bloated"? I think it's pretty damn lean considering what you get in the trade-off. Try this test (using VC6): 1) Build a simple MDI app that with appwizard. Start a new AppWizard EXE project, and turn off "AxtiveX Controls", and change the MFC link option to "link statically" (those are the only two changes I made to the default AppWizard settings). When appwizard is done, build the release version of the resulting code. I got an EXE file that was reported in explorer as being 276k. 2) Now, using C++ (remember, no MFC is allowed here), build a pure Win32 API app which is *identical* in functionality to the one created in step 1. 1) How big is you pure API app? 2) How long did it take you to do it? 3) Do you honestly feel that MFC's "bloated" code was not worth the savings in time considering the difference in resulting executable sizes? "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    1 Reply Last reply
                    0
                    • W Waleed Eissa

                      Hi all, Just out of curiosity, how many of you don't like MFC? I prefer using Win32 API to MFC .. well, in general I hate wrappers. With all my respect to MFC, it seems too mysterious for me. May be because I'm a kind of person that prefers to know how things are working not just use them "as is". Believe it or not, I find Win32 much easier than MFC - even though I'm a beginner.

                      H Offline
                      H Offline
                      Henry Jacobs
                      wrote on last edited by
                      #17

                      I am comfortable with the Win32 API. I spend too much time trying to trick MFC into doing what I want it to do. Granted, I don't have as much experience with the MFC as I do the Win32 API.

                      1 Reply Last reply
                      0
                      • C Christian Graus

                        Steven Hicks wrote: I prefer the Win32 API over MFC, because the WinAPI gives you speed and power. I've done both, and I think the idea of Win32 being faster is vastly overrated. I'm interested though - can you quantify your POV ? Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

                        Sonork ID 100.10002:MeanManOz

                        I live in Bob's HungOut now

                        S Offline
                        S Offline
                        Steven Hicks n 1
                        wrote on last edited by
                        #18

                        When i say that Win32 API gives you more speed i mean that it takes up less memory, because you choose what you want it to load. When i say that Win32 API gives you more power i mean that you more choice how the app looks, what is drawn on the app. I am not saying in any way that the Win32 API is competely better than the MFC. They both have there uses. Visit Ltpb.8m.com
                        Looking for more tutorials? Ltpb.8m.com/Tutorial
                        3D Image Library: Ltpb.8m.com/Image
                        Surf the web faster than ever: http://www.404Browser.com

                        C 1 Reply Last reply
                        0
                        • S Steven Hicks n 1

                          When i say that Win32 API gives you more speed i mean that it takes up less memory, because you choose what you want it to load. When i say that Win32 API gives you more power i mean that you more choice how the app looks, what is drawn on the app. I am not saying in any way that the Win32 API is competely better than the MFC. They both have there uses. Visit Ltpb.8m.com
                          Looking for more tutorials? Ltpb.8m.com/Tutorial
                          3D Image Library: Ltpb.8m.com/Image
                          Surf the web faster than ever: http://www.404Browser.com

                          C Offline
                          C Offline
                          Christian Graus
                          wrote on last edited by
                          #19

                          Steven Hicks wrote: I am not saying in any way that the Win32 API is competely better than the MFC. They both have there uses. I couldn't agree more - I use both, too. Steven Hicks wrote: When i say that Win32 API gives you more speed i mean that it takes up less memory, because you choose what you want it to load. This follows if you're targetting low end machines, but I have 640 MB of memory and with prices where they have been, I'd think a lot of people have at least 256 now. Steven Hicks wrote: When i say that Win32 API gives you more power i mean that you more choice how the app looks, what is drawn on the app. D'ya think so ? Having done both, I find it much easier to customise the look and feel of MFC apps. Christian After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

                          Sonork ID 100.10002:MeanManOz

                          I live in Bob's HungOut now

                          1 Reply Last reply
                          0
                          • W Waleed Eissa

                            Hi all, Just out of curiosity, how many of you don't like MFC? I prefer using Win32 API to MFC .. well, in general I hate wrappers. With all my respect to MFC, it seems too mysterious for me. May be because I'm a kind of person that prefers to know how things are working not just use them "as is". Believe it or not, I find Win32 much easier than MFC - even though I'm a beginner.

                            E Offline
                            E Offline
                            Erik Funkenbusch
                            wrote on last edited by
                            #20

                            MFC isn't as bad as everyone makes out. MFC is actually very customizeable. The problem is that most people accept the wizard generated code as being what MFC is. No, you don't need all that crud. You can make some very lean MFC based apps if you understand how it all works, and since the source code is provided (unlike the Win32 API) you can see exactly what it's doing. You should also check out the book "Undocumented MFC" by Scot Wingo and George Shepherd. It's great place to learn tricks and tips about MFC. For simple applications, Win32 is fine. But using it to create complex ones will take a LONG time. For instance, try providing split edit windows and docking toolbars without a framework like MFC and see how much work it is. -- Where are we going? And why am I in this handbasket?

                            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