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. INI Files Under VC++ 2005 ?

INI Files Under VC++ 2005 ?

Scheduled Pinned Locked Moved C / C++ / MFC
c++delphixmlquestion
10 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.
  • F Offline
    F Offline
    Fritzables
    wrote on last edited by
    #1

    Hi All, I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++. In these to environments to create read from or write to a INI file was a pretty easy process as there were classes for these already part of the Borland products. With VC++ I am finding that there are no native classes to use to create the INI – but I will stand corrected though. :-D After more investigation I find that there is a push to replace the INI file with an XML file. Is this correct ? Are there tutorials I can read to get an understanding on how I create/write/read from these files ? What are they called these days. With the INI file, they were just referred to as “INI Files” – what are they called these days (using XML) ? Pete :)

    Y J L K F 5 Replies Last reply
    0
    • F Fritzables

      Hi All, I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++. In these to environments to create read from or write to a INI file was a pretty easy process as there were classes for these already part of the Borland products. With VC++ I am finding that there are no native classes to use to create the INI – but I will stand corrected though. :-D After more investigation I find that there is a push to replace the INI file with an XML file. Is this correct ? Are there tutorials I can read to get an understanding on how I create/write/read from these files ? What are they called these days. With the INI file, they were just referred to as “INI Files” – what are they called these days (using XML) ? Pete :)

      Y Offline
      Y Offline
      YaronNir
      wrote on last edited by
      #2

      Check out in MSDN the methods : WritePrivateProfileXXXXX where XXXX is the type you want to write... (strint int etc.) Yaron Ask not what your application can do for you, Ask what you can do for your application

      1 Reply Last reply
      0
      • F Fritzables

        Hi All, I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++. In these to environments to create read from or write to a INI file was a pretty easy process as there were classes for these already part of the Borland products. With VC++ I am finding that there are no native classes to use to create the INI – but I will stand corrected though. :-D After more investigation I find that there is a push to replace the INI file with an XML file. Is this correct ? Are there tutorials I can read to get an understanding on how I create/write/read from these files ? What are they called these days. With the INI file, they were just referred to as “INI Files” – what are they called these days (using XML) ? Pete :)

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        I am not sure about VC++ 2005, but the raw APIs should still be there. As far as I know INI files are still called INI files, it is just that they where replaced by the registry when Win95 came out. It is not that you could no longer use INI files, it was just that the registry was the new and recomended way to save the same information. The raw APIs could now be used to write/read the registry or an INI file. They seem to be wanting to replace everything with XML files, so I do not know what [all] they are doing with them at the moment. Try looking up WriteProfileString() and see where that leads you. Good Luck! INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

        1 Reply Last reply
        0
        • F Fritzables

          Hi All, I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++. In these to environments to create read from or write to a INI file was a pretty easy process as there were classes for these already part of the Borland products. With VC++ I am finding that there are no native classes to use to create the INI – but I will stand corrected though. :-D After more investigation I find that there is a push to replace the INI file with an XML file. Is this correct ? Are there tutorials I can read to get an understanding on how I create/write/read from these files ? What are they called these days. With the INI file, they were just referred to as “INI Files” – what are they called these days (using XML) ? Pete :)

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

          As Yaron say, WritePrivateProfileXXX is good, it will use either an INI file or the registry depends on the version of Windows. I believe now the default is the registry. Look around on CP and there are INI file classes as well. Elaine :rose: The tigress is here :-D

          1 Reply Last reply
          0
          • F Fritzables

            Hi All, I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++. In these to environments to create read from or write to a INI file was a pretty easy process as there were classes for these already part of the Borland products. With VC++ I am finding that there are no native classes to use to create the INI – but I will stand corrected though. :-D After more investigation I find that there is a push to replace the INI file with an XML file. Is this correct ? Are there tutorials I can read to get an understanding on how I create/write/read from these files ? What are they called these days. With the INI file, they were just referred to as “INI Files” – what are they called these days (using XML) ? Pete :)

            K Offline
            K Offline
            Kevin McFarlane
            wrote on last edited by
            #5

            Fritzables wrote:

            I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++.

            BTW, have you moved to VC++ 2005 as a result of Borland's recent decision to sell their IDE business? Kevin

            M 1 Reply Last reply
            0
            • F Fritzables

              Hi All, I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++. In these to environments to create read from or write to a INI file was a pretty easy process as there were classes for these already part of the Borland products. With VC++ I am finding that there are no native classes to use to create the INI – but I will stand corrected though. :-D After more investigation I find that there is a push to replace the INI file with an XML file. Is this correct ? Are there tutorials I can read to get an understanding on how I create/write/read from these files ? What are they called these days. With the INI file, they were just referred to as “INI Files” – what are they called these days (using XML) ? Pete :)

              F Offline
              F Offline
              Fritzables
              wrote on last edited by
              #6

              G'Day All, Thanks for the help on this one. Actually I may stay with creating an INI file instead of having to change a registry setting when ever I want to change a value. No, I didn't know Borland was getting out if the IDE side of things - very interesting indeed. Is this a recent announcement ? Pete

              G 1 Reply Last reply
              0
              • K Kevin McFarlane

                Fritzables wrote:

                I am fairly new to Visual C++ (2005). Up until now I have been using the Borland product, both Delphi & C++.

                BTW, have you moved to VC++ 2005 as a result of Borland's recent decision to sell their IDE business? Kevin

                M Offline
                M Offline
                Maxwell Chen
                wrote on last edited by
                #7

                Kevin McFarlane wrote:

                Borland's recent decision to sell their IDE business?

                I have heard this rumor for 2 years or more.


                Maxwell Chen

                K 1 Reply Last reply
                0
                • M Maxwell Chen

                  Kevin McFarlane wrote:

                  Borland's recent decision to sell their IDE business?

                  I have heard this rumor for 2 years or more.


                  Maxwell Chen

                  K Offline
                  K Offline
                  Kevin McFarlane
                  wrote on last edited by
                  #8

                  Well, it's actually an official announcement now. Was the rumour of two years ago also an official announcement? Kevin

                  M 1 Reply Last reply
                  0
                  • K Kevin McFarlane

                    Well, it's actually an official announcement now. Was the rumour of two years ago also an official announcement? Kevin

                    M Offline
                    M Offline
                    Maxwell Chen
                    wrote on last edited by
                    #9

                    It wasn't.


                    Maxwell Chen

                    1 Reply Last reply
                    0
                    • F Fritzables

                      G'Day All, Thanks for the help on this one. Actually I may stay with creating an INI file instead of having to change a registry setting when ever I want to change a value. No, I didn't know Borland was getting out if the IDE side of things - very interesting indeed. Is this a recent announcement ? Pete

                      G Offline
                      G Offline
                      Gordon Brandly
                      wrote on last edited by
                      #10

                      It was announced a couple of months ago. There's various articles on BDN about it, and much discussion on the borland.cppbuilder.* groups. If Kevin's interested in my answer to his question: I've been using C++Builder almost exclusively since version 3 came out, but I started the move to VS 2003/2005 last autumn. I won't be completing the move for several years at least, since I have many current C++Builder applications to support and many more legacy apps I'll be supporting for a long time to come. The "DevCo" announcement just made me feel better about making the change -- I'm tired of using an IDE that's always a poor stepsister to Delphi. :(

                      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