Serach implementation
C / C++ / MFC
4
Posts
4
Posters
0
Views
1
Watching
-
The found index or (-1) will be returned :) :
int CYourWnd::TryToFindInBox(const CString& cszWhat)
CString cszBoxText;
GetDlgItemText(IDC_EDIT1, cszBoxText); // IDC_EDIT1 is ID of your box
return cszBoxText.Find(cszWhat);
}Check your definition of Irrationality[^] :) 1 - Avicenna 5 - Hubbard 3 - Own definition
-
In addition to what Eugen Podsypalnikov mentioned, may be you can use EM_SETSEL message to highlight the selected text. Other option would be to use a Rich Edit control and EM_FINDTEXTEX message.