Thread: How do I make my edit box move text to the next line?

  1. #1
    Registered User
    Join Date
    Dec 2004

    How do I make my edit box move text to the next line?

    I have an edit box and I want to have the dialog box return a new line when the text goes past a certain point. Like a text wrap. Is there something, such as ES_AUTOHSCROLL I can put in my initialization code that can make my text wrap?

  2. #2
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Uncheck the ES_AUTOHSCROLL (or take it out of code if you're using Win32), and make sure it's multiline.

  3. #3
    Handy Andy andyhunter's Avatar
    Join Date
    Dec 2004
    When you create the edit box set it up like this:

    hwndEdit = CreateWindow (TEXT ("edit"), NULL,
                             WS_CHILD | WS_VISIBLE |  WS_VSCROLL | //<---------------Just V scroll
                                       WS_BORDER | ES_LEFT | ES_MULTILINE  
    								 | ES_AUTOVSCROLL,//<-------------------Auto scrolling(vertical only)
                             0, 0, 0, 0, hwnd, (HMENU) ID_EDIT,
                             ((LPCREATESTRUCT) lParam) -> hInstance, NULL) ;
    I believe this comes from your original post for edit boxes so you should see the similarity in the coding and be able to apply it.

    Happy Coding!!!!
    i don't think most standard compilers support programmers with more than 4 red boxes - Misplaced

    It is my sacred duity to stand in the path of the flood of ignorance and blatant stupidity... - quzah

    Such pointless tricks ceased to be interesting or useful when we came down from the trees and started using higher level languages. - Salem

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  2. New Theme
    By XSquared in forum A Brief History of
    Replies: 160
    Last Post: 04-01-2004, 08:00 PM
  3. Validating the contents of a char buffer
    By mattz in forum C Programming
    Replies: 3
    Last Post: 12-09-2001, 06:21 PM
  4. Placing Text in An Edit box
    By CodeMonkey in forum Windows Programming
    Replies: 13
    Last Post: 11-25-2001, 08:13 PM
  5. How do I make a text box??
    By BubbleMan in forum Windows Programming
    Replies: 12
    Last Post: 08-24-2001, 02:31 AM