Solved

Word Break in CRichEditControl

Posted on 1998-10-21
1
455 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

710 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