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. A notepad-like class...

A notepad-like class...

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelpquestion
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
    Mr Freeze
    wrote on last edited by
    #1

    Hi, I would like to display and edit a text (a simple multi-line text) from a file like notepad does. Is there an easy-to-use class somewhere? I was told I should use an edit-box control, but this seems a bit complicated... I have to implement all the serialization stuff and so on and I might not implement it in an efficent way. Thanks for any help :)

    C 1 Reply Last reply
    0
    • M Mr Freeze

      Hi, I would like to display and edit a text (a simple multi-line text) from a file like notepad does. Is there an easy-to-use class somewhere? I was told I should use an edit-box control, but this seems a bit complicated... I have to implement all the serialization stuff and so on and I might not implement it in an efficent way. Thanks for any help :)

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Mr.Freeze wrote: I was told I should use an edit-box control, but this seems a bit complicated... I have to implement all the serialization stuff and so on and I might not implement it in an efficent way. There is no ready made class, and it would be counter efficient for one to exist, because it would constrain you too much. Serialisation is easy - SetWindowText and GetWindowText to pass to the CEdit and a CFile or fstream, it's only three lines of code to store or retrieve the text in question. You also need to set the multiline property of the CEdit, or you'll only get one line of text. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

      M 1 Reply Last reply
      0
      • C Christian Graus

        Mr.Freeze wrote: I was told I should use an edit-box control, but this seems a bit complicated... I have to implement all the serialization stuff and so on and I might not implement it in an efficent way. There is no ready made class, and it would be counter efficient for one to exist, because it would constrain you too much. Serialisation is easy - SetWindowText and GetWindowText to pass to the CEdit and a CFile or fstream, it's only three lines of code to store or retrieve the text in question. You also need to set the multiline property of the CEdit, or you'll only get one line of text. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

        M Offline
        M Offline
        Mr Freeze
        wrote on last edited by
        #3

        Thank you Christian :)

        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