CHARFORMAT结构

 The CHARFORMAT structure contains information about character formatting in a rich edit control.

Rich Edit 2.0: The CHARFORMAT2 structure is a Microsoft Rich Edit 2.0 extension of the CHARFORMAT structure. Rich Edit 2.0 and later allows you to use either structure with the EM_GETCHARFORMAT and EM_SETCHARFORMAT messages.

Syntax

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.

注:本文的翻译是从Google的语言工具中得来的,部分修改过,有些看不懂的我就没改了。

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值