-
Edit box scroll
How would one go about scrolling to the end of a multiline edit box?
e.g. when i fill an edit box with 1000 chars, the control shows a scroll bar, but i cant make that scroll-bar scroll down automaticly!
ive tried setscroll(x,y) but it has no effect!
help!
joe
#
-
Try EM_SETSEL to place the cursor at the end of the contents of the edit control, followed by a EM_SCROLLCARET to bring the cursor into view. You might only need the first message, however.
Hope that is of some use to you. :)
-
Sorry, im new to this!
How would i do that using MFC?
m_MyEdit.SetPropery(EM_SCROLLCARRET);
?
joe
#
-
I don't know MFC, but it's probably:
m_MyEdit.SendMessage(EM_SCROLLCARET);
You may even have to call it whenever you get a key message from the edit.