\n is unko

This is a discussion on \n is unko within the Windows Programming forums, part of the Platform Specific Boards category; In the follwing example in my program, when I use SetDlgItemText(), when I place a '\n' in the last argument ...

  1. #1
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

    \n is unko

    In the follwing example in my program, when I use SetDlgItemText(), when I place a '\n' in the last argument (what its meant to be changed to) it replaces it with a | or something.
    Code:
    SetDlgItemText(hDlg, IDC_OUTPUT, "example\nstring");
    Can anybody help?

    Thanks
    -Chris
    Last edited by face_master; 06-18-2002 at 05:30 AM.

  2. #2
    Unregistered
    Guest
    You could try /r instead.

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Nope, \r does the same thing as \n is doing...

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Have you tried both...

    "\r\n"...

    That usually works for edits....

  5. #5
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    thanks. that worked.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. UNKO errors
    By face_master in forum Windows Programming
    Replies: 2
    Last Post: 01-25-2002, 05:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21