导航:  Windows Procedures >

AfxModifyFontSettings

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

描述

 

修改控件窗口使用的字体设置.

 

FreeBASIC 语法

 

FUNCTION AfxModifyFontSettings ( _

  BYVAL hwnd AS HWND, _

  BYVAL nSetting AS LONG, _

  BYVAL nValue AS LONG _

) AS HFONT

 

参数

 

hwnd

[in]窗口或控件的句柄

nSetting

[in]一体的afx_font_xxx常数.

nValue

[in]取决于价值的nSetting.

AFX_FONT_HEIGHT: The base is 100. To increase the font a 20% pass 120; to reduce it a 20% pass 80%.

AFX_FONT_WEIGHT: The weight of the font in the range 0 through 1000. For example, 400 is normal and  700 is bold. If this value is zero, a default weight is used. The following values are defined for convenience. FW_DONTCARE (0), FW_THIN (100), FW_EXTRALIGHT (200), FW_ULTRALIGHT (200), FW_LIGHT (300), FW_NORMAL (400), FW_REGULAR (400), FW_MEDIUM (500), FW_SEMIBOLD (600), FW_DEMIBOLD (600), FW_BOLD (700), FW_EXTRABOLD (800), FW_ULTRABOLD (800), FW_HEAVY (900), FW_BLACK (900)

AFX_FONT_ITALIC : TRUE or FALSE.

AFX_FONT_UNDERLINE : TRUE or FALSE.

AFX_FONT_STRIKEOUT : TRUE or FALSE.

AFX_FONT_CHARSET: The following values are predefined: ANSI_CHARSET, BALTIC_CHARSET, CHINESEBIG5_CHARSET, DEFAULT_CHARSET, EASTEUROPE_CHARSET, GB2312_CHARSET, GREEK_CHARSET, HANGUL_CHARSET, MAC_CHARSET, OEM_CHARSET, RUSSIAN_CHARSET, SHIFTJIS_CHARSET, SYMBOL_CHARSET, TURKISH_CHARSET, VIETNAMESE_CHARSET, JOHAB_CHARSET (Korean language edition of Windows), ARABIC_CHARSET and HEBREW_CHARSET (Middle East language edition of Windows), THAI_CHARSET (Thai language edition of Windows). The OEM_CHARSET value specifies a character set that is operating-system dependent. DEFAULT_CHARSET is set to a value based on the current system locale. For example, when the system locale is English (United States), it is set as ANSI_CHARSET. Fonts with other character sets may exist in the operating system. If an application uses a font with an unknown character set, it should not attempt to translate or interpret strings that are rendered with that font. This parameter is important in the font mapping process. To ensure consistent results, specify a specific character set. If you specify a typeface name in the lfFaceName member, make sure that the lfCharSet value matches the character set of the typeface specified in lfFaceName.

 

返回值

 

对成功的新字体的处理,或NULL失败.

为了获得更多的错误信息给GetLastError.

 

备注

 

返回字体必须被DeleteObject或宏观DeleteFont时不再需要防止内存泄漏.

 

引用文件

 

AfxWin.inc