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. General Programming
  3. C / C++ / MFC
  4. Design Question: When use Win32 and when MFC?

Design Question: When use Win32 and when MFC?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++cssdesignperformance
16 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.
  • M Offline
    M Offline
    mandanani
    wrote on last edited by
    #1

    Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

    S K C C N 8 Replies Last reply
    0
    • M mandanani

      Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

      S Offline
      S Offline
      sw thi
      wrote on last edited by
      #2

      I think, one more thing is 'Size'. Size of the application will be more for MFC.

      "a child will grow up to become an adult, but you can never stop the adult from acting like a child"

      1 Reply Last reply
      0
      • M mandanani

        Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        If you turn off GUI features MFC also gets as fast as Win32. If you really need performance you write a worker thread without GUI. The signifikant time is for me the development time. :-O My bosses want almost the new features running next week. :mad:

        Greetings from Germany

        B D 2 Replies Last reply
        0
        • M mandanani

          Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          mandanani wrote:

          MFC has low performance

          Why do you need performance ? Is it so relevant that you need to consider it ? Are you developping some 'time-critical' application ? If no, why do you bother about performance ? Do you think the user will notice that your project takes 100 msec more to start ?


          Cédric Moonen Software developer
          Charting control [v1.2]

          A 1 Reply Last reply
          0
          • K KarstenK

            If you turn off GUI features MFC also gets as fast as Win32. If you really need performance you write a worker thread without GUI. The signifikant time is for me the development time. :-O My bosses want almost the new features running next week. :mad:

            Greetings from Germany

            B Offline
            B Offline
            BadKarma
            wrote on last edited by
            #5

            KarstenK wrote:

            My bosses want almost the new features running next week.

            Wow, lucky you a full week :-D

            codito ergo sum

            1 Reply Last reply
            0
            • M mandanani

              Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

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

              mandanani wrote:

              MFC has low performance

              Rubbish.

              Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              L M 2 Replies Last reply
              0
              • C Cedric Moonen

                mandanani wrote:

                MFC has low performance

                Why do you need performance ? Is it so relevant that you need to consider it ? Are you developping some 'time-critical' application ? If no, why do you bother about performance ? Do you think the user will notice that your project takes 100 msec more to start ?


                Cédric Moonen Software developer
                Charting control [v1.2]

                A Offline
                A Offline
                Anurag Gandhi
                wrote on last edited by
                #7

                Please ask the questions like this. I Always go for performance. If i am creating the application which takes time 2 second to execute i will always try to minimize the time to even less than a quarter of a second.

                Anurag Gandhi. http://www.softgandhi.co.nr

                C 1 Reply Last reply
                0
                • M mandanani

                  Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

                  N Offline
                  N Offline
                  Nemanja Trifunovic
                  wrote on last edited by
                  #8

                  How about WTL?


                  Programming Blog utf8-cpp

                  1 Reply Last reply
                  0
                  • M mandanani

                    Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

                    CPalliniC Offline
                    CPalliniC Offline
                    CPallini
                    wrote on last edited by
                    #9

                    mandanani wrote:

                    MFC has low performance but development time is less

                    In most cases saving development time is the best option (and software reliability is even more valuable). Moreover, IMHO, performace differences between MFC and WIN32 API are almost irrelevant for the average software developer (like me: I usually have to look for better designs and algorithms to improve the overall performance). That said, I think that MFC is a good class library but you need to use it only if fits your needs, in other words, if you don't like the Framework, WIN32 API is an option. :-D

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

                    In testa che avete, signor di Ceprano?

                    1 Reply Last reply
                    0
                    • K KarstenK

                      If you turn off GUI features MFC also gets as fast as Win32. If you really need performance you write a worker thread without GUI. The signifikant time is for me the development time. :-O My bosses want almost the new features running next week. :mad:

                      Greetings from Germany

                      D Offline
                      D Offline
                      David Crow
                      wrote on last edited by
                      #10

                      KarstenK wrote:

                      If you really need performance you write a worker thread...

                      :laugh: It's amazing how many folks think more threads equates to better performance.


                      "A good athlete is the result of a good and worthy opponent." - David Crow

                      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                      1 Reply Last reply
                      0
                      • C Christian Graus

                        mandanani wrote:

                        MFC has low performance

                        Rubbish.

                        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

                        L Offline
                        L Offline
                        led mike
                        wrote on last edited by
                        #11

                        Christian Graus wrote:

                        Rubbish.

                        Yeah... having been around a few years... I have seen the performance enemy. ;)

                        1 Reply Last reply
                        0
                        • A Anurag Gandhi

                          Please ask the questions like this. I Always go for performance. If i am creating the application which takes time 2 second to execute i will always try to minimize the time to even less than a quarter of a second.

                          Anurag Gandhi. http://www.softgandhi.co.nr

                          C Offline
                          C Offline
                          Cedric Moonen
                          wrote on last edited by
                          #12

                          So, to reduce the launching time of your application from 2 seconds to 1 second, you'll be ready to spend twice as much time for development ? Honnestly, it is a complete nonsense to me. And furthermore, your application will probably be much harder to maintain. For a 'normal' application (I mean a standard desktop application), why do you even speak about performance ?


                          Cédric Moonen Software developer
                          Charting control [v1.2]

                          1 Reply Last reply
                          0
                          • C Christian Graus

                            mandanani wrote:

                            MFC has low performance

                            Rubbish.

                            Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

                            M Offline
                            M Offline
                            Mark Salsbery
                            wrote on last edited by
                            #13

                            Christian Graus wrote:

                            Rubbish.

                            Finally, a rational post to this thread :)

                            Mark Salsbery Microsoft MVP - Visual C++ :java:

                            1 Reply Last reply
                            0
                            • M mandanani

                              Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

                              M Offline
                              M Offline
                              Mark Salsbery
                              wrote on last edited by
                              #14

                              mandanani wrote:

                              Using Win32 has high performance...MFC has low performance

                              What exactly do you think MFC uses?  Which part of MFC have you seen give worse performance than straight Win32 calls? I'm not agreeing or disagreeing, but when I see this statement I want proof. Most of the time it's just parroting what some uninformed peer has stated. I'm calling B.S. Mark

                              Mark Salsbery Microsoft MVP - Visual C++ :java:

                              1 Reply Last reply
                              0
                              • M mandanani

                                Using Win32 has high performance but takes more development time. MFC has low performance but development time is less. Am I right and any more pros & cons

                                F Offline
                                F Offline
                                Force Code
                                wrote on last edited by
                                #15

                                As best I can tell, MFC is nothing but a convoluted "object-oriented" wrapper around the Win32SDK. My opinion is that object-orientation often serves to obfuscate functionality, hinder maintenance, and it certainly cannot improve performance any. If you look at the binary for a windows executable you'll see win32 sdk calls, not MFC. So for personal projects, why add another layer you have to learn which doesn't actually add anything. It is worth noting that GDI+ is offered in its standard "object-oriented" guise as well as in a flat api. The same is true of the FreeImage Graphics Library. The Cairo graphics library, (which I highly recommend, BTW, along with FreeImage) is strictly a flat api and a model of lucidity. The web browser Mozilla uses Cairo instead of GDI+.

                                M 1 Reply Last reply
                                0
                                • F Force Code

                                  As best I can tell, MFC is nothing but a convoluted "object-oriented" wrapper around the Win32SDK. My opinion is that object-orientation often serves to obfuscate functionality, hinder maintenance, and it certainly cannot improve performance any. If you look at the binary for a windows executable you'll see win32 sdk calls, not MFC. So for personal projects, why add another layer you have to learn which doesn't actually add anything. It is worth noting that GDI+ is offered in its standard "object-oriented" guise as well as in a flat api. The same is true of the FreeImage Graphics Library. The Cairo graphics library, (which I highly recommend, BTW, along with FreeImage) is strictly a flat api and a model of lucidity. The web browser Mozilla uses Cairo instead of GDI+.

                                  M Offline
                                  M Offline
                                  mandanani
                                  wrote on last edited by
                                  #16

                                  seem like folks had misunderstood me. I prefer to develop a project with MFC until and unless my boss compels. In fact bosses doesn't know basics of any languange. ;P This is just a question came to mind, and thought of getting all your valuable views :) But MFC adds extra layer over Win32 and will have less (may be negligible to many:-D) performance to Win32. With MFC application can be written in fly ::cool: Bottom-line those who love ooops prefer to use MFC and those traditional C programmers prefer Win32.

                                  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