导航:  Windows Controls Procedures > Rich Edit Control > Structures >

GETTEXTLENGTHEX

上一页返回章节概述下一页

描述

 

The GETTEXTLENGTHEX structure contains information about how the text length of a rich edit control should be calculated. This structure is passed in the wParam in the EM_GETTEXTLENGTHEX message.

 

C/C++ 语法

 

typedef struct _gettextlengthex {

DWORD flags;

UINT codepage;

} GETTEXTLENGTHEX;

 

FreeBasic Syntax

 

TYPE GETTEXTLENGTHEX

flags    AS DWORD

codepage AS UINT

END TYPE

 

成员

 

flags

 

Value specifying the method to be used in determining the text length. This member can be one or more of the following values (some values are mutually exclusive).

 

GTL_DEFAULT

Returns the number of characters. This is the default.

GTL_USECRLF

Computes the answer by using CR/LFs at the end of paragraphs.

GTL_PRECISE

Computes a precise answer. This approach could necessitate a conversion and thereby take longer. This flag cannot be used with the GTL_CLOSE flag. E_INVALIDARG will be returned if both are used.

GTL_CLOSE

Computes an approximate (close) answer. It is obtained quickly and can be used to set the buffer size. This flag cannot be used with the GTL_PRECISE flag. E_INVALIDARG will be returned if both are used.

GTL_NUMCHARS

Returns the number of characters. This flag cannot be used with the GTL_NUMBYTES flag. E_INVALIDARG will be returned if both are used.

GTL_NUMBYTES

Returns the number of bytes. This flag cannot be used with the GTL_NUMCHARS flag. E_INVALIDARG will be returned if both are used.

 

codepage

 

Code page used in the translation. It is CP_ACP for ANSI Code Page and 1200 for Unicode.

 

最低操作系统

 

Windows 95 with Rich Edit 2.0, Windows 98, Windows NT 4.0.