Solved

Word Break in CRichEditControl

Posted on 1998-10-21
1
426 Views
Last Modified: 2013-12-03
The following are from VC++5.0 Help, but no more details can be found any where:

A rich edit control (CRichEditCtrl) calls a function called a "word break procedure" to find breaks between words and to determine where it can break lines. The control uses this information when performing word-wrap operations and when processing the CTRL+LEFT and CTRL+RIGHT key combinations. An application can send messages to a rich edit control to replace the default word-break procedure, to retrieve word-break information, and to determine what line a given character falls on.

I am writing a Chinese editor and need to modify the word wrap logic in RichEditControl.
0
Comment
Question by:dingdang
1 Comment
 
LVL 15

Accepted Solution

by:
NickRepin earned 100 total points
Comment Utility
Please see help in Platform SDK/UserInterfaceServices/Common Controls/Rich Edit Controls/About RichEditControls/Word and line breaks for full description of this.

Here description from SDK doc for EditWordBreakProcEx:

An application-supplied callback function that determines the character index of the word break, or the character class and word break flags of the characters in the specified text.

LONG EditWordBreakProcEx(

    char *pchText,  
    LONG cchText,    
    BYTE bCharSet,  
    INT code  
   );
 

Parameters

pchText

Pointer to the text at the current position. If code specifies movement to the left, the text is in the elements pchText[-1] through pchText[-cchText] and pchText[0] is undefined. For all other actions, the text is in the elements pchText[0] through pchText[
cchText - 1].

cchText

Number of characters in the buffer in the direction specified by code.

bCharSet

Character set of the text.

code

Wordbreak action to take. Can be one of the values described for the code parameter in the EM_FINDWORDBREAK message.

 

Return Values

Returns the character index of the word break, unless the code parameter is the WB_CLASSIFY or WB_ISDELIMITER value.

 

See Also

EM_FINDWORDBREAK



0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now