Problem with Rich Edit control  
Author Message
Suneel VLN





PostPosted: Visual C++ General, Problem with Rich Edit control Top

I am using a rich edit control and when I try to find some text using FindText control it is always returning -1.

I am using FINDTEXTEX structure and dwFlags perfectly

but it is always returning -1

I tried using the methods AfxInitRichEdit and AfxInitRichEdit2 then also it is giving the same results

Is ther any solution to this problem



Visual C++11  
 
 
Viorel.





PostPosted: Visual C++ General, Problem with Rich Edit control Top

According to documentation, -1 is returned when no matches are found. This can be caused too by incorrect initialization of passed data. For example, you did not define correctly the lpstrText value.

 

Maybe you should show us some eloquent details

 


 
 
Suneel VLN





PostPosted: Visual C++ General, Problem with Rich Edit control Top

I found the answer

after entering text into rich edit control we need to go back to the statitng position of the rich edit control

then it is working fine