Click here to Skip to main content
15,915,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Can anybody please tell me how to get the word count from A CRichEditCtrl.

Thanks
Dev.
Posted
Updated 6-Feb-11 21:48pm
v2
Comments
Dalek Dave 7-Feb-11 3:48am    
Minor Edit for Readability.

See this[^] thread - this may help you calculate the word count.

Just get the text from this control and apply this logic.
 
Share this answer
 
Comments
Dalek Dave 7-Feb-11 3:49am    
Good link
Abhinav S 7-Feb-11 3:51am    
Thanks.
If you use the GetWindowText function instead of streaming out of the rich edit control, you will only get the unformatted text so that you wont need to deal with the formatting characters.

Then you just need to find the characters that define a new word.
 
Share this answer
 
Comments
Dalek Dave 7-Feb-11 3:49am    
Good advice.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900