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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Where to store configuration data

Where to store configuration data

Scheduled Pinned Locked Moved C / C++ / MFC
c++comtoolsquestionworkspace
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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    When writing a MFC app (typically MDI type), how do people usually store the configuration options ? The samples I've looked at usually don't save them so you have to reset any option whe nyou restart the application. Preferred methods or any to avoid ? Thanks. Elaine :rose: The tigress is here :-D

    V P S L P 5 Replies Last reply
    0
    • L Lost User

      When writing a MFC app (typically MDI type), how do people usually store the configuration options ? The samples I've looked at usually don't save them so you have to reset any option whe nyou restart the application. Preferred methods or any to avoid ? Thanks. Elaine :rose: The tigress is here :-D

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      One solution is the registry. Kuphryn

      1 Reply Last reply
      0
      • L Lost User

        When writing a MFC app (typically MDI type), how do people usually store the configuration options ? The samples I've looked at usually don't save them so you have to reset any option whe nyou restart the application. Preferred methods or any to avoid ? Thanks. Elaine :rose: The tigress is here :-D

        P Offline
        P Offline
        peterchen
        wrote on last edited by
        #3

        Registry is fine, but not the newest thing under the stars... For "partially trusted" applications (kind of the .NET sandbox), there's Isolated Storage. There was also a relatively quick way to serialize a class to an XML file in the Application Data of the current user - which might be the "modern" way. [edit] damn! I'm just back from the C# forum - for good old MFC it's the registry[/edit]


        "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
        sighist | Agile Programming | doxygen

        R 1 Reply Last reply
        0
        • P peterchen

          Registry is fine, but not the newest thing under the stars... For "partially trusted" applications (kind of the .NET sandbox), there's Isolated Storage. There was also a relatively quick way to serialize a class to an XML file in the Application Data of the current user - which might be the "modern" way. [edit] damn! I'm just back from the C# forum - for good old MFC it's the registry[/edit]


          "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
          sighist | Agile Programming | doxygen

          R Offline
          R Offline
          Robert Little
          wrote on last edited by
          #4

          You could always go with the ultra-modern INI file! :)

          1 Reply Last reply
          0
          • L Lost User

            When writing a MFC app (typically MDI type), how do people usually store the configuration options ? The samples I've looked at usually don't save them so you have to reset any option whe nyou restart the application. Preferred methods or any to avoid ? Thanks. Elaine :rose: The tigress is here :-D

            S Offline
            S Offline
            Shafiee
            wrote on last edited by
            #5

            XML files are the best for saving configuration data!

            1 Reply Last reply
            0
            • L Lost User

              When writing a MFC app (typically MDI type), how do people usually store the configuration options ? The samples I've looked at usually don't save them so you have to reset any option whe nyou restart the application. Preferred methods or any to avoid ? Thanks. Elaine :rose: The tigress is here :-D

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

              This allows data to be serialised to and from the registry, so I just create a class for the data that can be serialised - one entry that is defined purely within the class ! Serialising into the registry[^] Elaine :rose: The tigress is here :-D

              1 Reply Last reply
              0
              • L Lost User

                When writing a MFC app (typically MDI type), how do people usually store the configuration options ? The samples I've looked at usually don't save them so you have to reset any option whe nyou restart the application. Preferred methods or any to avoid ? Thanks. Elaine :rose: The tigress is here :-D

                P Offline
                P Offline
                Paul Hooper
                wrote on last edited by
                #7

                After years of storing information in the registry, we are now standardizing on... ini files! The reason? MUCH lower support costs for our particular niche. My company sells to schools and our products are typically run in networked situations. School networks 1. Are run by sysadmins who have a poor understanding of their networks. 2. Are EXTREMELY concerned with locking down the system. 3. Often have some truly bizarre policies in place. 4. Often rebuild a standard working environment on every login. We have found that our customers like being able to edit, copy and move a straight-forward text file and they can usually solve their problems themselves. With our old registry-based solution we spent enormous amounts of time trying to make our system support their (often bizarre) needs and then explaining the solution to them. Paul Hooper If you spend your whole life looking over your shoulder, they will get you from the front instead.

                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