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?
Printable View
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?
Uncheck the ES_AUTOHSCROLL (or take it out of code if you're using Win32), and make sure it's multiline.
When you create the edit box set it up like this:
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.Code:
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) ;
Happy Coding!!!!