Home > Software engineering > Under the great god come in MFC, big data to CRichEdit controls, the cursor pointer has been in a bu
Under the great god come in MFC, big data to CRichEdit controls, the cursor pointer has been in a bu
Time:10-06
//the code below is in a CRichEdit control tail, additional according to new data (such as 1024 * 16 characters), automatic scrolling, vertical scrolling, after the completion of the last line in the new display,
//this code will call,
//the problem now is that the cursor pointer has been in a busy state, is actually in the Arrow and Wait to switch between two states, don't want to display a Wait state, Arrow will always want to display, the great god, the action!
PedCtrl - & gt; SetSel (txtLen, 1);//Set the cursor to the end of the text area and deselect everything. PedCtrl - & gt; ReplaceSel (strMyString + (strMyString GetLength () & lt; 1? _T (" ") : _T (" \ n ")));//Inserts the when nothing is selected.
Int n1=strMyString. GetLength (); Int n2=pedCtrl - & gt; GetTextLengthEx (dwFlags); //the Apply formating the to the just inserted text. PedCtrl - & gt; SetSel (txtLen pedCtrl - & gt; GetTextLengthEx (dwFlags)); PedCtrl - & gt; SetSelectionCharFormat (cf).