Thread: adding a line of text to a readonly edit control?

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    21

    Lightbulb adding a line of text to a readonly edit control?

    how do i add a line of text in a edit control? i can only seem to set the first line, it is a mutiline edit control.

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Try removing the read only style and then adding the text. then return the read only style.

    use SendMessage and EM_SETREADONLY
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    SetWindowText should work.

    [EDIT]
    but you have to add the text to a buffer that holds whats already in the edit control then call SetWindowText with that buffer bc it just resets whats there

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. Adding a Text Control - HELP
    By WIN32_Man1 in forum Windows Programming
    Replies: 1
    Last Post: 06-21-2004, 10:16 AM
  3. displaying text and numbers in an edit control
    By dicky in forum Windows Programming
    Replies: 4
    Last Post: 06-05-2004, 08:07 AM
  4. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM