1. Create a new edit box control, tick its multiline (Multiline) Front (property set to True), auto HScroll the front tick (property set false), so that each line is filled and then wrapped automatically.
2. Tick the vertical scrollbar (vetrical Scroll) before the vertical scroll bar appears when the input or display exceeds the size of the edit box (the property is set to true).
3. If it is input, the scroll bar will automatically move to follow the current input line, but if the settings will be a lot of content once the edit box display, the scroll bar will always be at the top, you need to manually pull to the bottom to see the last line of content, in many cases this is not needed, but want the scroll bar at the bottom, The following code will implement this function:
This->setdlgitemtext (IDC_EDIT_RECV,STR);//Displays the contents of the string str to an edit box with ID idc_edit_recv
M_recvshw. Linescroll (M_RECVSHW. Getlinecount ());//M_RECVSHW is the member variable of the edit box (that is, a variable of control type)
Use some member functions of a control variable to set the position of the scroll bar
See http://blog.csdn.net/wu_lai_314/article/details/8317395
"Go" MFC edit box Wrap line, vertical scroll bar automatically Move Down