Results 1 to 5 of 5

Thread: Control will only take one line of text. Why ?

  1. #1

    Thread Starter
    Member
    Join Date
    May 2001
    Location
    UK
    Posts
    40

    Question Control will only take one line of text. Why ?

    O.S: Win98
    Compiler: Dev-C++ version 4
    Level: keen newbie

    Hello,

    Okay, I’ve missed something. I’ve created a text box with the code below. The problem is I can only enter or paste one line of text into the control. What property setting or argument(s) have I missed?

    Thank you for your help

    hmm


    // the code:

    hctlTextBox = CreateWindowEx(
    WS_EX_CLIENTEDGE,
    "Edit",
    "",
    WS_CHILD | WS_VISIBLE, 50, 50, 350, 400,
    hwnd,
    NULL,
    hThisInstance,
    NULL);

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You need to include the ES_MULTILINE window style.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Member
    Join Date
    May 2001
    Location
    UK
    Posts
    40

    Talking Thanks parksie

    Thanks parksie that did the trick. One question though. Is the number of lines of text limited to the height property of the control?

    hmm

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No. On Win9x it's limited to 64K of data (like in Notepad). It will scroll I think if you specify something like ES_AUTOVSCROLL | ES_AUTOHSCROLL.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    Member
    Join Date
    May 2001
    Location
    UK
    Posts
    40

    Talking Perfect

    Thanks parksie that worked perfectly

    hmm


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width