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. Saving/loading data in listbox from e.g. text file in MFC SDI ?

Saving/loading data in listbox from e.g. text file in MFC SDI ?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++helpquestion
3 Posts 2 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.
  • P Offline
    P Offline
    phicho
    wrote on last edited by
    #1

    can anyone explain or point me to some link or something where i can learn how to save/load text from harddisk ? my project is to make program that can save cooking recipes with their pictures and should have search box where you can type word example "eggs" and somewhere should appear all recipes with eggs and when i select the title of some recipe example "Fish and chips" in the picture box should apper picture of the meal and in the label or something similar should apper all the ingredients for the meal my idea is thet i can put the recipes in a list box and search via edit box and i can put simple picture control for the pictures of the recipes where should appear but the problem comes with the saving all the data ( the text for the recipe and the path of the pictures ) cant put it in a string because in that case the user cant puts his own recipes and pictures... thanks in advance

    D P 2 Replies Last reply
    0
    • P phicho

      can anyone explain or point me to some link or something where i can learn how to save/load text from harddisk ? my project is to make program that can save cooking recipes with their pictures and should have search box where you can type word example "eggs" and somewhere should appear all recipes with eggs and when i select the title of some recipe example "Fish and chips" in the picture box should apper picture of the meal and in the label or something similar should apper all the ingredients for the meal my idea is thet i can put the recipes in a list box and search via edit box and i can put simple picture control for the pictures of the recipes where should appear but the problem comes with the saving all the data ( the text for the recipe and the path of the pictures ) cant put it in a string because in that case the user cant puts his own recipes and pictures... thanks in advance

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

      Since you are using MFC, check out CFile, CArchive, and serialization. From a design perspective, don't focus on your project as a whole. Instead, work on the small pieces first (e.g., reading from and writing to a file, populating a listbox, filtering a listbox based on the contents of an edit control), and they will eventually meld themselves into a working application.

      "Love people and use things, not love things and use people." - Unknown

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      1 Reply Last reply
      0
      • P phicho

        can anyone explain or point me to some link or something where i can learn how to save/load text from harddisk ? my project is to make program that can save cooking recipes with their pictures and should have search box where you can type word example "eggs" and somewhere should appear all recipes with eggs and when i select the title of some recipe example "Fish and chips" in the picture box should apper picture of the meal and in the label or something similar should apper all the ingredients for the meal my idea is thet i can put the recipes in a list box and search via edit box and i can put simple picture control for the pictures of the recipes where should appear but the problem comes with the saving all the data ( the text for the recipe and the path of the pictures ) cant put it in a string because in that case the user cant puts his own recipes and pictures... thanks in advance

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

        i think i found what i was looking for so to answer briefly to anyone how may have the save problem and is searching here this link http://www.functionx.com/visualc/fileprocessing/commondlgs.htm and this link http://www.codeproject.com/KB/cpp/cfg.aspx help me a lot

        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