Hi Robert How do i focus it to the correct idc? i get an assert: { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETSEL, nStartChar, nEndChar); if (!bNoScroll) this is the code i have: void CAutoUpdaterDlg::OnUpdateScreen() { char LocalBuffer[10]; itter++; sprintf(LocalBuffer, "%d", itter); CEdit * p = static_cast(GetDlgItem(IDC_Window)); // static message for now if(!FilesInProgress) { strcat(WindowBuffer, LocalBuffer); strcat(WindowBuffer, ": "); } else strcat(WindowBuffer, ""); strcat(WindowBuffer, DynamicBuffer); int Size = strlen(WindowBuffer); p->SetMargins(5,5); p->SetWindowText(Convert_A_To_DA(WindowBuffer)); CProgressCtrl * progress = static_cast(GetDlgItem(IDC_PROGRESS)); progress->SetRange(0,MaxRange);Progress++; progress->SetPos(Progress); int MemSize = strlen(DynamicBuffer); for(int i = 0; i<= MemSize+1; i++) { DynamicBuffer[i] = 0x00; } CEdit myEdit; CString csContent = _T(Convert_A_To_DA(WindowBuffer)); myEdit.GetWindowText( csContent ); myEdit.SetSel( csContent.GetLength(), csContent.GetLength(), TRUE /* scroll to the selected text */ ); UpdateWindow(); FilesInProgress = false; }