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. To save & restore Files and Folders

To save & restore Files and Folders

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

    Hi All I want to save some files, & folders to specified location given by user and again restore that saved files & Folders to given specified location. Please suggest me that how can I do it Thanks.

    A 1 Reply Last reply
    0
    • R rajeevktripathi

      Hi All I want to save some files, & folders to specified location given by user and again restore that saved files & Folders to given specified location. Please suggest me that how can I do it Thanks.

      A Offline
      A Offline
      AHawk
      wrote on last edited by
      #2

      You can use your CWinApp derived class in either a Dialog based application, or Multi/Single based app. What you do is create a CString variable in that derived class and load it by GetProfileString( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault = 0 ); Such as: class header: class CWhateverClass { . . . private: CString FileName; } class source: BOOL CWhateverClass::InitInstance() { . . . FileName = GetProfileString( "Saved", SavedFileName, FileName ); . . . } int CWhateverClass::ExitInstance() { . . . WriteProfileString( "Saved", SavedFileName, FileName ); . . . return CWinApp::ExitInstance(); } You are able to manipulate the CString FileName from other parts of your app by using theApp. Hope I hit what you were getting at. Aaron

      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