Solved

Word Break in CRichEditControl

Posted on 1998-10-21
1
444 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
ID: 1415516
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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