编辑控件对应的成员变量是m_Edit1,已经设置属性是多行,带垂直滚动条,自动滚动。
要求在响应Button1的消息时,不论有多少行,总能看到光标。
void CAboutDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CString str;
m_Edit1.GetWindowText(str);
str += "fasfsaffsafasfasfarteryy546yhfgbf";
m_Edit1.SetWindowText(str);
//下面如何?}
要求在响应Button1的消息时,不论有多少行,总能看到光标。
void CAboutDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CString str;
m_Edit1.GetWindowText(str);
str += "fasfsaffsafasfasfarteryy546yhfgbf";
m_Edit1.SetWindowText(str);
//下面如何?}
pEdit->SetWindowText("Loaded 'C:\WINNT\system32\comctl32.dll', no matching symbolic information found.Loaded 'C:\WINNT\system32\comctl32.dll', no matching symbolic information found.Loaded 'C:\WINNT\system32\comctl32.dll', no matching symbolic information found.Loaded 'C:\WINNT\system32\comctl32.dll', no matching symbolic information found.Loaded 'C:\WINNT\system32\comctl32.dll', no matching symbolic information found.");
pEdit->SetScrollPos(SB_VERT,0xffff);
使用
m_Edit1.SetSel(-1);