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. CView/ new line

CView/ new line

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.
  • _ Offline
    _ Offline
    _8086
    wrote on last edited by
    #1

    How do I display rows of text?

    CString testString;
    testString = "Test!";
    testString +="\\r\\n";
    testString +="Test Again";
    pDc->TextOutA(0,0,testString.GetBuffer(),testString.GetLength());
    testString.ReleaseBuffer();	
    

    This displays text as

    Test!||TestAgain.

    And not like

    Test!
    Test Again

    What should I do? Also, when I'm reading text from file, how do I control the newline?

    ---------------------------- 286? WOWW!:-O

    N 1 Reply Last reply
    0
    • _ _8086

      How do I display rows of text?

      CString testString;
      testString = "Test!";
      testString +="\\r\\n";
      testString +="Test Again";
      pDc->TextOutA(0,0,testString.GetBuffer(),testString.GetLength());
      testString.ReleaseBuffer();	
      

      This displays text as

      Test!||TestAgain.

      And not like

      Test!
      Test Again

      What should I do? Also, when I'm reading text from file, how do I control the newline?

      ---------------------------- 286? WOWW!:-O

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      _8086 wrote:

      pDc->TextOutA

      Use DrawText instead of TextOut.


      Nibu thomas A Developer Programming tips[^]  My site[^]

      _ 1 Reply Last reply
      0
      • N Nibu babu thomas

        _8086 wrote:

        pDc->TextOutA

        Use DrawText instead of TextOut.


        Nibu thomas A Developer Programming tips[^]  My site[^]

        _ Offline
        _ Offline
        _8086
        wrote on last edited by
        #3

        :beer:

        ---------------------------- 286? WOWW!:-O

        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