A text box
I'm making a windows program and I went to make a text box, but there's a limit to the number of characters it will hold. It only holds up until the box is filled. It's fine if I just make the box extra big, but that's not what I want. This is the code I'm using:
where hFile is the handle to the text box.
hFile = CreateWindowEx(WS_EX_CLIENTEDGE,"EDIT",NULL,
WS_CHILD | WS_VISIBLE ,
(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),
Thanks in advance.
I'm not sure what you want exactly but I think you want to add the style
and / or
to the edit so that it will scroll the text if it is too big to fit in the edit.
could you ask the question again.
novacain is absolutely right. You want to make the edit box scrollable (and multi-lined) so that the box can hold more text than its size will allow.
Here is more info.
thanks, that helped. But for ES_MULTILINE, that obviously gives it more than one line. But where do you specify how many lines? Or is it just automatic?
An edit box can hold 64K of text. I don't know of a built-in line limiter - you may have to do that your self by responding to messages/notifications from the edit box.
OK, thanks. I was thinking of something else, but I figured it out.