I've written some app in MFC for logging through the COM port of my PC, all data I receive I put into CEdit control, and here I have a issue, sometimes it is necessary for me to analyze data and I wish to stop autoscrolling of my control and just freeze on current view for a while, during that time I wish to my incoming data still were written to the control. Is there anybody who can advise me how to accomplish such a functionality ?

Please take a look on function by which a add data into my control,
b_DataFreezeToggle variable is a toggle variable I've tried to get number of line to which my view supposed to return after filling control.
void MyDialog::AppendTextToEditCtrl(CEdit& edit, LPCTSTR pszText) {
	// get the initial text length
	int nLength = edit.GetWindowTextLength();
	// put the selection at the end of text
	edit.SetSel(nLength, nLength);
	// replace the selection
	if(b_DataFreezeToggle) { 
		vs_debug("Selection set %d\n",nFreezedPos) ; 
		edit.SetSel(nFreezedPos, nFreezedPos,FALSE);
Please take a quick look, I'd really appreciate your help