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. How to Save Text File in SDI application

How to Save Text File in SDI application

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
11 Posts 6 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 phanindra varma

    hi... I have an application which send data to some "InputData.txt". Now if i click " FILE->Save " then it needs to be ask for saving that "InputData.txt" in browsed Location!! can u help in this regard.. Thanks in advanvce!!!!!

    R Offline
    R Offline
    Rajesh R Subramanian
    wrote on last edited by
    #2

    So, was your previous query solved? Why don't you take a little time to thank the ones who solved it before asking the next question?

    Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

    R 1 Reply Last reply
    0
    • P phanindra varma

      hi... I have an application which send data to some "InputData.txt". Now if i click " FILE->Save " then it needs to be ask for saving that "InputData.txt" in browsed Location!! can u help in this regard.. Thanks in advanvce!!!!!

      N Offline
      N Offline
      Nitheesh George
      wrote on last edited by
      #3

      Hi, Handle the Save click and in Save Click handler do the Following CFileDialog dlg; if(dlg.DoModal() == IDOK) { CString fileName = dlg.GetPathName(); } thanks Nitheesh

      1 Reply Last reply
      0
      • R Rajesh R Subramanian

        So, was your previous query solved? Why don't you take a little time to thank the ones who solved it before asking the next question?

        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

        R Offline
        R Offline
        Rajkumar R
        wrote on last edited by
        #4

        I adjust for troll's vote for now as I think CPallini will take some more hours. :)

        H R 2 Replies Last reply
        0
        • P phanindra varma

          hi... I have an application which send data to some "InputData.txt". Now if i click " FILE->Save " then it needs to be ask for saving that "InputData.txt" in browsed Location!! can u help in this regard.. Thanks in advanvce!!!!!

          R Offline
          R Offline
          Rajkumar R
          wrote on last edited by
          #5

          If you properly used SDI framework in MFC, it will do for you.

          P 1 Reply Last reply
          0
          • R Rajkumar R

            I adjust for troll's vote for now as I think CPallini will take some more hours. :)

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

            I think he is sleep now. ;)

            1 Reply Last reply
            0
            • R Rajkumar R

              I adjust for troll's vote for now as I think CPallini will take some more hours. :)

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #7

              Thanks for the vote man. I appreciate it. :)

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              R 1 Reply Last reply
              0
              • R Rajesh R Subramanian

                Thanks for the vote man. I appreciate it. :)

                Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

                R Offline
                R Offline
                Rajkumar R
                wrote on last edited by
                #8

                I see that as the advance adjustment for the foreseen troll's vote. :laugh:

                1 Reply Last reply
                0
                • R Rajkumar R

                  If you properly used SDI framework in MFC, it will do for you.

                  P Offline
                  P Offline
                  phanindra varma
                  wrote on last edited by
                  #9

                  In my application i have some buttons.... if i click them then some data will be stored in a buffer.i need that data to be stored in a File. How can i do that..... and If i click File->Save ,then which handler will be called and how can i override that function to save my data in Text File!!!!! THANKS in advance....

                  R 1 Reply Last reply
                  0
                  • P phanindra varma

                    In my application i have some buttons.... if i click them then some data will be stored in a buffer.i need that data to be stored in a File. How can i do that..... and If i click File->Save ,then which handler will be called and how can i override that function to save my data in Text File!!!!! THANKS in advance....

                    R Offline
                    R Offline
                    Rajkumar R
                    wrote on last edited by
                    #10

                    Are you using MFC SDI? [Implicit Creation of a CArchive Object via the Framework^] It will call the ::Serialize() you may refer msdn for MFC Serialization. Otherwise, you need to use APIs for showing up Browse for file dialog and use file APIs to write data.

                    1 Reply Last reply
                    0
                    • P phanindra varma

                      hi... I have an application which send data to some "InputData.txt". Now if i click " FILE->Save " then it needs to be ask for saving that "InputData.txt" in browsed Location!! can u help in this regard.. Thanks in advanvce!!!!!

                      A Offline
                      A Offline
                      asrelu
                      wrote on last edited by
                      #11

                      From CMainFrame to CMainFrame (same source and destination) send a WM_COMMAND message: SendMessage( WM_COMMAND, ID_FILE_SAVE_AS, 0);

                      modified on Sunday, May 11, 2008 6:54 AM

                      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