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. CFile trouble

CFile trouble

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

    Hello, when i like to overwrite data in a file with new data, how i do it? I have a file where i save the filenames entered in the "save as" dialog window. Thanks, Mark

    H 1 Reply Last reply
    0
    • M macmac38

      Hello, when i like to overwrite data in a file with new data, how i do it? I have a file where i save the filenames entered in the "save as" dialog window. Thanks, Mark

      H Offline
      H Offline
      Hari Krishnan Noida
      wrote on last edited by
      #2

      Hi, use "CFile::modeCreate" mode. It will truncate the file to 0, if the file is already exists(overwrite). Otherwise, it will create a new file. Hope this helps regards ~Hari~

      M 1 Reply Last reply
      0
      • H Hari Krishnan Noida

        Hi, use "CFile::modeCreate" mode. It will truncate the file to 0, if the file is already exists(overwrite). Otherwise, it will create a new file. Hope this helps regards ~Hari~

        M Offline
        M Offline
        macmac38
        wrote on last edited by
        #3

        Thanks! I haven't found a good howto about CFile in the web yet. Always the same stuff like in the VC help.. regards Mark

        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