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. retain items in the list control

retain items in the list control

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

    how do i retain items in the list control so that even when i close the application, the items would still be availiable in the list control.

    _ 1 Reply Last reply
    0
    • J jokefake

      how do i retain items in the list control so that even when i close the application, the items would still be availiable in the list control.

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Save it to a file. At the time of retrieval just read from the file Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      J 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        Save it to a file. At the time of retrieval just read from the file Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        J Offline
        J Offline
        jokefake
        wrote on last edited by
        #3

        how can i do that, i am very new in programming

        _ D H 3 Replies Last reply
        0
        • J jokefake

          how can i do that, i am very new in programming

          _ Offline
          _ Offline
          _AnsHUMAN_
          wrote on last edited by
          #4

          Read the items from the list control. When you are closing your application/relevant dialog write the contents of the list to a file. Use CFile, CStdioFile, fread() / fwrite() to put/get the data to/from the file and put it in the corresponding rows/columns of the list control when you are calling the list control dialog to display again Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          1 Reply Last reply
          0
          • J jokefake

            how can i do that, i am very new in programming

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

            jokefake wrote:

            i am very new in programming

            So have you not studied up on file I/O? That's very basic stuff, that should be mastered before advancing on to more difficult topics.


            "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

            "Judge not by the eye but by the heart." - Native American Proverb

            1 Reply Last reply
            0
            • J jokefake

              how can i do that, i am very new in programming

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              if you have for example a listbox (1) Create a file with CFile or CStdioFile (2)read items in the loop from listbox m_litsbox.GetText(i,str); (4)write to file (3) close file And read MSDN and a good book_**


              **_

              whitesky


              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