CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    9

    HELP AYUDAME! "\n" in a Cfile or edit box???

    Can somebody help me?? i don't know how i can put a "\n" (new line, return, EOL...) in a CFile, multiline Edit box or a CString object. Alway when i try tu put "\n" ( is the most logic, no??) i get a special caracter like |.
    Please, answer me soon as posible to: [email protected]
    MUCHAS GRACIAS!!!!(=i will be so pleasent, jeje)


  2. #2
    Join Date
    Apr 1999
    Posts
    383

    Re: HELP AYUDAME! "\n" in a Cfile or edit box???

    Use the CR/LF (carriage return + line feed) characters together: "\r\n"

    Dave




  3. #3
    Join Date
    May 1999
    Location
    Antwerp, Belgium
    Posts
    136

    Re: HELP AYUDAME! "\n" in a Cfile or edit box???

    When you open the file, open it in binary mode. When you open it with the text mode the \r\n is replaced with \n.

    EditBox needs a \r\n as a newline.

    Make sure that when you create the file that it's opened for binary access.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured