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. Save Function

Save Function

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

    I need help in doing a save function. The program needs to save the text in the text field from a dialog into a text file. The dialog is called from the application which is in MDI form. Thanks. jazzlycool

    T 1 Reply Last reply
    0
    • J jazzlycool

      I need help in doing a save function. The program needs to save the text in the text field from a dialog into a text file. The dialog is called from the application which is in MDI form. Thanks. jazzlycool

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

      #include <fstream>
      //...
      ofstream dest("\\fold\\my_file.txt");
      Cstring Buffer;
      (GetDlgItem(MY_CONTROL))->GetWindowText(Buffer);
      dest << Buffer;
      dest.close();


      TOXCCT >>> GEII power

      J 1 Reply Last reply
      0
      • T toxcct

        #include <fstream>
        //...
        ofstream dest("\\fold\\my_file.txt");
        Cstring Buffer;
        (GetDlgItem(MY_CONTROL))->GetWindowText(Buffer);
        dest << Buffer;
        dest.close();


        TOXCCT >>> GEII power

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

        Thank you very much. It works very well.:) jazzlycool

        T 1 Reply Last reply
        0
        • J jazzlycool

          Thank you very much. It works very well.:) jazzlycool

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          perfect, i wasn't 100% sure of me :-D now i am... eheheh


          TOXCCT >>> GEII power

          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