Replacing characters in RichEdit
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I want that whenever i type char : and ) it should be replaced.I am using following approch . void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { CRichEditCtrl::OnChar(nChar, nRepCnt, nFlags); uPervChar=uNextChar; uNextChar=nChar; if(uPervChar==_T(':')&&uNextChar==_T(')')) { nEnd=GetWindowTextLength(); nBeg=nEnd-2; SetSel(nBeg,nEnd); ReplaceSel(""); } } It wroks fine .But its slow .Is there any other way pls tell me. Learner always