网站首页  词典首页

请输入您要查询的函数:

 

术语 editwordbreakproc
释义 EditWordBreakProc
语法:
int CALLBACK EditWordBreakProc( LPTSTR lpch,
int ichCurrent,
int cch,
int code
);
EditWordBreakProc功能
一个应用程序定义的回调函数与EM_SETWORDBREAKPROC消息使用。多行编辑控制或丰富的编辑控制功能,调用一个EditWordBreakProc打破一行文本。
在EDITWORDBREAKPROC类型定义一个指向这个回调函数。 EditWordBreakProc是一个应用程序的占位符定义函数的名称。
参数
lpch
[in]的指针的编辑控件的文本。
ichCurrent
[in]索引中的一个缓冲区的文字标识的点的功能应该开始一个词休息检查字符位置。
协调委员会
[in]中的编辑控件中的文本数量TCHARs。对于ANSI文本,这是字节数;为Unicode文本,这是WCHARs数量。
代码
[in]的行动应采取的回调函数。此参数可以是下列值之一。
WB_CLASSIFY
检索字符类和字符的字旗打破在指定位置。此值控制与丰富的编辑使用。
WB_ISDELIMITER
检查是否在指定位置的字符是分隔符。
WB_LEFT
查找一个单词的开始指定位置的左边。
WB_LEFTBREAK
找到终字分隔符指定位置的左边。此值控制与丰富的编辑使用。
WB_MOVEWORDLEFT
查找一个单词的开始指定位置的左边。此值用于在按CTRL +左键处理。此值控制与丰富的编辑使用。
WB_MOVEWORDRIGHT
查找一个单词的开始指定位置的权利。此值期间使用CTRL +向右键关键加工。此值控制与丰富的编辑使用。
WB_RIGHT
查找一个单词的开始指定位置的权利。这是非常有用的右对齐编辑控件。
WB_RIGHTBREAK
找到终字分隔符指定位置的权利。这是非常有用的右对齐编辑控件。此值控制与丰富的编辑使用。
返回值
如果代码参数指定WB_ISDELIMITER,则返回值为非零(真)如果在指定位置的字符是分隔符,或零,如果事实并非如此。如果代码参数指定WB_CLASSIFY,返回值是字符类并在指定位置的字符的字打破标志。否则,返回值是对中的一个字的文本缓冲区开始的索引。
备注
按回车换行后,必须被视为回调函数的一个字。由还必须为一个字换行处理后两个回车。
应用程序必须安装在指定的EM_SETWORDBREAKPROC消息的回调函数的地址的回调函数。
丰富的编辑1.0:微软丰富编辑1.0只传回ANSI字符EditWordBreakProc。对于丰富的编辑控件,可以交替使用EM_SETWORDBREAKPROCEX消息替换默认扩展词与EditWordBreakProcEx回调函数的破解程序。此功能提供如字符有关文本的其他信息,设置。
丰富的编辑2.0和更高版本:丰富的编辑2.0及更高版本将球回传给Unicode字符EditWordBreakProc。因此,一个ANSI应用程序将转换富编辑提供的使用WideCharToMultiByte Unicode字符串,然后转换指标适当。
功能信息
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryNone
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
EditWordBreakProcEx,SendMessage消息,EM_FINDWORDBREAK,EM_SETWORDBREAKPROC,EM_SETWORDBREAKPROCEX
==英文原文==EditWordBreakProc Function
An application-defined callback function used with the EM_SETWORDBREAKPROC message. A multiline edit control or a rich edit control calls an EditWordBreakProc function to break a line of text.
The EDITWORDBREAKPROC type defines a pointer to this callback function. EditWordBreakProc is a placeholder for the application-defined function name.
Syntax
int CALLBACK EditWordBreakProc( LPTSTR lpch,
int ichCurrent,
int cch,
int code
);
Parameters
lpch
[in] A pointer to the text of the edit control.
ichCurrent
[in] An index to a character position in the buffer of text that identifies the point at which the function should begin checking for a word break.
cch
[in] The number of TCHARs in the edit control text. For the ANSI text, this is the number of bytes; for the Unicode text, this is the number of WCHARs.
code
[in] The action to be taken by the callback function. This parameter can be one of the following values.
WB_CLASSIFY
Retrieves the character class and word break flags of the character at the specified position. This value is for use with rich edit controls.
WB_ISDELIMITER
Checks whether the character at the specified position is a delimiter.
WB_LEFT
Finds the beginning of a word to the left of the specified position.
WB_LEFTBREAK
Finds the end-of-word delimiter to the left of the specified position. This value is for use with rich edit controls.
WB_MOVEWORDLEFT
Finds the beginning of a word to the left of the specified position. This value is used during CTRL+LEFT key processing. This value is for use with rich edit controls.
WB_MOVEWORDRIGHT
Finds the beginning of a word to the right of the specified position. This value is used during CTRL+RIGHT key processing. This value is for use with rich edit controls.
WB_RIGHT
Finds the beginning of a word to the right of the specified position. This is useful in right-aligned edit controls.
WB_RIGHTBREAK
Finds the end-of-word delimiter to the right of the specified position. This is useful in right-aligned edit controls. This value is for use with rich edit controls.
Return Value
If the code parameter specifies WB_ISDELIMITER, the return value is nonzero (TRUE) if the character at the specified position is a delimiter, or zero if it is not. If the code parameter specifies WB_CLASSIFY, the return value is the character class and word break flags of the character at the specified position. Otherwise, the return value is an index to the beginning of a word in the buffer of text.
Remarks
A carriage return followed by a line feed must be treated as a single word by the callback function. Two carriage returns followed by a line feed also must be treated as a single word.
An application must install the callback function by specifying the address of the callback function in an EM_SETWORDBREAKPROC message.
Rich Edit 1.0:Microsoft Rich Edit 1.0 only passes back ANSI characters to EditWordBreakProc. For rich edit controls, you can alternately use the EM_SETWORDBREAKPROCEX message to replace the default extended word break procedure with an EditWordBreakProcEx callback function. This function provides additional information about the text, such as the character set.
Rich Edit 2.0 and later:Rich Edit 2.0 and later only pass back Unicode characters to EditWordBreakProc. Thus, an ANSI application would convert the Rich Edit-supplied Unicode string using WideCharToMultiByte , and then translate the indices appropriately.
Function Information
HeaderDeclared in Winuser.h, include Windows.h
Import libraryNone
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
EditWordBreakProcEx , SendMessage , EM_FINDWORDBREAK , EM_SETWORDBREAKPROC , EM_SETWORDBREAKPROCEX
==原始网址==http://msdn.microsoft.com/en-us/library/bb761709(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:29:30