typedef struct _charformat { UINT cbSize; DWORD dwMask; DWORD dwEffects; LONG yHeight; LONG yOffset; COLORREF crTextColor; BYTE bCharSet; BYTE bPitchAndFamily; TCHAR szFaceName[LF_FACESIZE]; } CHARFORMAT;
Members
cbSize
Size in bytes of the specified structure. This member must be set before passing
the structure to the rich edit control.
大小字节的特定结构。
这个成员必须定后才通过结构,
以丰富的编辑控制。
dwMask
Members containing valid information or attributes to set. This member can be
zero, one, or more than one of the following values.
成员包含有效信息或属性设置。这个成员可以是零,一个或多个下列情形
之一的有效信息。
CFM_BOLD
The CFE_BOLD value of the
dwEffects
member is valid.
CFE_BOLD
值使的
dwEffects
成员是有效的。
CFM_CHARSET
The
bCharSet
member is valid.
bCharSet
成员是有效的。
CFM_COLOR
The
crTextColor
member and the CFE_AUTOCOLOR value of the
dwEffects
member are valid.
crTextColor
值及
CFE_AUTOCOLOR
的
dwEffects
成员有效。
CFM_FACE
The
szFaceName
member is valid.
szFaceName
成员是有效的。
CFM_ITALIC
The CFE_ITALIC value of the
dwEffects
member is valid.
CFE_ITALIC
值使
dwEffects
成员有效。
CFM_OFFSET
The
yOffset
member is valid.
使
yOffset
成员有效。
CFM_PROTECTED
The CFE_PROTECTED value of the
dwEffects
member is valid.
CFE_PROTECTED
值使
dwEffects
有效。
CFM_SIZE
The
yHeight
member is valid.
使
yHeight
成员有效。
CFM_STRIKEOUT
The CFE_STRIKEOUT value of the
dwEffects
member is valid.
CFE_STRIKEOUT
值使
dwEffects
成员有效。
CFM_UNDERLINE.
The CFE_UNDERLINE value of the
dwEffects
member is valid.
CFE_UNDERLINE
值使
dwEffects
成员有效。
dwEffects
Character effects. This member can be a combination of the following values.
性格的影响。这个会员,可结合以下的价值观。
CFE_AUTOCOLOR
The text color is the return value of
GetSysColor
(COLOR_WINDOWTEXT).
文本颜色是返回值
getsyscolor
(
color_windowtext
)。
CFE_BOLD
Characters are bold.
加粗。
CFE_DISABLED
RichEdit 2.0 and later:
Characters are displayed with a shadow that is offset
by 3/4 point or one pixel, whichever is larger.
richedit 2.0
和后来:字符显示一个阴影,是抵消了
3 / 4
点或
1
个像素,两
者较大。
CFE_ITALIC
Characters are italic.
斜体。
CFE_STRIKEOUT
Characters are struck.
删除线。
CFE_UNDERLINE
Characters are underlined.
下划线。
CFE_PROTECTED
Characters are protected; an attempt to modify them will cause an
EN_PROTECTED
notification message.
汉字的保障
;
企图修改它们会造成
en_protected
通知讯息。
yHeight
Character height, in twips (1/1440 of an inch or 1/20 of a printer's point).
字符高度,在
twips
(
1 / 1440
的一英寸或
1 / 20
的一台打印机的点)。
yOffset
Character offset, in twips, from the baseline. If the value of this member is
positive, the character is a superscript; if it is negative, the character is a
subscript.
性格偏移,在
twips
,从基线。如果价值的会员,这是积极的,性格是一
个标
;
如果是否定的,性格是一个标。
crTextColor
Text color. This member is ignored if the CFE_AUTOCOLOR character effect
is specified. To generate a
COLORREF
, use the
RGB
macro.
文字色彩。这个成员被忽略,如果
cfe_autocolor
性格的影响是指明。以产
生
colorref
,使用的
RGB
宏观调控。
bCharSet
Character set value. The
bCharSet
member can be one of the values specified
for the
lfCharSet
member of the
LOGFONT
structure. Rich Edit 3.0 may
override this value if it is invalid for the target characters.
字符集的价值。该
bcharset
会员,可其中的价值指定为
lfcharset
成员之一
logfont
结构。丰富的编辑
3.0
可以推翻这个值,如果是无效的目标人物。
bPitchAndFamily
Font family and pitch. This member is the same as the
lfPitchAndFamily
member of the
LOGFONT
structure.
字体家人和足球场。这个会员是一样的
lfpitchandfamily
成员之一
logfont
结构。
szFaceName
Null-terminated character array specifying the font name.
零终止字符数组指明字体名称。
Remarks
This structure is used with the
EM_GETCHARFORMAT
and
EM_SETCHARFORMAT
messages.
Structure Information
Header
Declared in Richedit.h
Minimum operating systems
Windows 95, Windows NT 4.0
Unicode
Implemented as ANSI and Unicode versions.