Thread: Multiple lines on an Edit box

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    20

    Multiple lines on an Edit box

    How do I output multiple lines to an Edit Box?

    I try this:

    wsprintf( string, "Line 1 \n Line 2 \n Line 3 \n ", SectionType );
    SetDlgItemText(hWnd,IDC_OUTPUT,string);

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    It looks like you'll want to add ES_MULTILINE to your code when you make the actual box. You may want ES_WANTRETURN as well, since it allows you to use the enter key.

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    You will need the ES_MULTILINE style specified, then instead of simply "\n", specify "\r\n" in your string.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    20
    It works!

    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WS_HSCROLL in ES_READONLY edit box error
    By Homunculus in forum Windows Programming
    Replies: 4
    Last Post: 02-13-2006, 08:46 AM
  2. Extracting Text from Multiline Edit Box
    By The Brain in forum Windows Programming
    Replies: 1
    Last Post: 11-07-2005, 11:14 PM
  3. Multiline Edit Box Parser
    By The Brain in forum Windows Programming
    Replies: 6
    Last Post: 11-01-2005, 07:15 PM
  4. display a file in dropdown edit box
    By sunburnbyRA in forum Windows Programming
    Replies: 2
    Last Post: 03-10-2004, 01:58 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM