PDA

Click to See Complete Forum and Search --> : Control will only take one line of text. Why ?


hmm
Jul 29th, 2001, 02:04 PM
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 :confused:


// the code:

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

parksie
Jul 29th, 2001, 02:07 PM
You need to include the ES_MULTILINE window style.

hmm
Jul 29th, 2001, 02:39 PM
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 :)

parksie
Jul 29th, 2001, 02:41 PM
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.

hmm
Jul 29th, 2001, 02:50 PM
Thanks parksie that worked perfectly

hmm

:D :D :D:D :D :D