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. MFC ini Files

MFC ini Files

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
5 Posts 4 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.
  • C Offline
    C Offline
    charu123
    wrote on last edited by
    #1

    hi, Can somebody tell me how to go about writing data from the controls to ini files. I know tht i can use WritePrivateProfileString function but i wanted to know what intializations i will be required to do as in creating a section etc before i can follow the synatx of writing into an ini file. Also i wanted to know how I can store multiple values for a control(combo box) into the same key using a loop or count. thanks U get wht u Give

    T R D C 4 Replies Last reply
    0
    • C charu123

      hi, Can somebody tell me how to go about writing data from the controls to ini files. I know tht i can use WritePrivateProfileString function but i wanted to know what intializations i will be required to do as in creating a section etc before i can follow the synatx of writing into an ini file. Also i wanted to know how I can store multiple values for a control(combo box) into the same key using a loop or count. thanks U get wht u Give

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      When you create a entry into ini file using above api, it itself create a file is doesn't exists, it itself create a section if doesn't exist and it itself overwrite the key if it exists. charu123 wrote: but i wanted to know what intializations i will be required to do as in creating a section etc no Extra initialization required


      [Vote One Here, Complete my Survey....] Alok Gupta
      visit me at http://www.thisisalok.tk          "I Think Believe this Will Help"

      1 Reply Last reply
      0
      • C charu123

        hi, Can somebody tell me how to go about writing data from the controls to ini files. I know tht i can use WritePrivateProfileString function but i wanted to know what intializations i will be required to do as in creating a section etc before i can follow the synatx of writing into an ini file. Also i wanted to know how I can store multiple values for a control(combo box) into the same key using a loop or count. thanks U get wht u Give

        R Offline
        R Offline
        Ravi Bhavnani
        wrote on last edited by
        #3

        You might find this[^] article useful. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

        1 Reply Last reply
        0
        • C charu123

          hi, Can somebody tell me how to go about writing data from the controls to ini files. I know tht i can use WritePrivateProfileString function but i wanted to know what intializations i will be required to do as in creating a section etc before i can follow the synatx of writing into an ini file. Also i wanted to know how I can store multiple values for a control(combo box) into the same key using a loop or count. thanks U get wht u Give

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

          charu123 wrote: Also i wanted to know how I can store multiple values for a control(combo box) into the same key using a loop or count. By definition, a combobox can only have one selection.


          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          1 Reply Last reply
          0
          • C charu123

            hi, Can somebody tell me how to go about writing data from the controls to ini files. I know tht i can use WritePrivateProfileString function but i wanted to know what intializations i will be required to do as in creating a section etc before i can follow the synatx of writing into an ini file. Also i wanted to know how I can store multiple values for a control(combo box) into the same key using a loop or count. thanks U get wht u Give

            C Offline
            C Offline
            charu123
            wrote on last edited by
            #5

            I managed to do the writing n reading using loop. Thanks all. U get wht u Give

            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