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. Does anyone know of a good article about shrinking EXE sizes?

Does anyone know of a good article about shrinking EXE sizes?

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
7 Posts 6 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.
  • T Offline
    T Offline
    Terry ONolley
    wrote on last edited by
    #1

    I am writing a web download installer and need to make it as small as possible. A lot of MFC is a black box to me so I am not sure which pieces I can hack out and still expect the program to behave as expected. It is currently 210 KB and I only wrote a thousand or so lines of source code (including comments). There is only 1 window and it is a dialog-based app. It does use the file open common dialog box and afxinet.h Thanks!


    //placeholder for witty verbiage

    A N J P J 5 Replies Last reply
    0
    • T Terry ONolley

      I am writing a web download installer and need to make it as small as possible. A lot of MFC is a black box to me so I am not sure which pieces I can hack out and still expect the program to behave as expected. It is currently 210 KB and I only wrote a thousand or so lines of source code (including comments). There is only 1 window and it is a dialog-based app. It does use the file open common dialog box and afxinet.h Thanks!


      //placeholder for witty verbiage

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      lets see... you could use an executable compressor like UPX for instance. Once you compile it run upx and compress your executable. get it here

      A 1 Reply Last reply
      0
      • A Anonymous

        lets see... you could use an executable compressor like UPX for instance. Once you compile it run upx and compress your executable. get it here

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        sorry about the link... get it at www.upx.sourceforge.net

        1 Reply Last reply
        0
        • T Terry ONolley

          I am writing a web download installer and need to make it as small as possible. A lot of MFC is a black box to me so I am not sure which pieces I can hack out and still expect the program to behave as expected. It is currently 210 KB and I only wrote a thousand or so lines of source code (including comments). There is only 1 window and it is a dialog-based app. It does use the file open common dialog box and afxinet.h Thanks!


          //placeholder for witty verbiage

          N Offline
          N Offline
          Nick Parker
          wrote on last edited by
          #4

          What about using the Windows Template Library, it's on SourceForge now here: Windows Template Library[^] - Nick Parker
          My Blog | My Articles

          1 Reply Last reply
          0
          • T Terry ONolley

            I am writing a web download installer and need to make it as small as possible. A lot of MFC is a black box to me so I am not sure which pieces I can hack out and still expect the program to behave as expected. It is currently 210 KB and I only wrote a thousand or so lines of source code (including comments). There is only 1 window and it is a dialog-based app. It does use the file open common dialog box and afxinet.h Thanks!


            //placeholder for witty verbiage

            J Offline
            J Offline
            Joe Woodbury
            wrote on last edited by
            #5

            Shrinking the size of an MFC app in VC++ 7.x is difficult. In VC++ 6.0, you could get it down to about 160k but not much more than that. Since it's dialog based, I'd consider just converting it to a standard windows app and taking the parts of afxinet.h that you need. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

            1 Reply Last reply
            0
            • T Terry ONolley

              I am writing a web download installer and need to make it as small as possible. A lot of MFC is a black box to me so I am not sure which pieces I can hack out and still expect the program to behave as expected. It is currently 210 KB and I only wrote a thousand or so lines of source code (including comments). There is only 1 window and it is a dialog-based app. It does use the file open common dialog box and afxinet.h Thanks!


              //placeholder for witty verbiage

              P Offline
              P Offline
              Paolo Vernazza
              wrote on last edited by
              #6

              If you want to keep it small then I think you should avoid using MFC.... write a simple application without them... Did you compiled your app using the static MFC library version? You cannot hope that who will use your installed has already the MFC Dlls

              1 Reply Last reply
              0
              • T Terry ONolley

                I am writing a web download installer and need to make it as small as possible. A lot of MFC is a black box to me so I am not sure which pieces I can hack out and still expect the program to behave as expected. It is currently 210 KB and I only wrote a thousand or so lines of source code (including comments). There is only 1 window and it is a dialog-based app. It does use the file open common dialog box and afxinet.h Thanks!


                //placeholder for witty verbiage

                J Offline
                J Offline
                Jonas Larsson
                wrote on last edited by
                #7

                Did you look at this?[^] --- "Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot

                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