网站首页  词典首页

请输入您要查询的函数:

 

术语 createfontindirect
释义 CreateFontIndirect
语法:
HFONT CreateFontIndirect(
__in const LOGFONT *lplf
);
CreateFontIndirect函数
该CreateFontIndirect函数创建一个逻辑字体具有指定的特征。字体随后可以被选定为任何设备上下文的当前字体。
参数
lplf [in]
一个 LOGFONT结构,它定义的逻辑字体的特点指针。
返回值
如果函数成功,返回值是一个句柄逻辑字体。
如果函数失败,返回值为NULL。
备注
该CreateFontIndirect函数创建一个与指定LOGFONT结构的特点,逻辑字体。当此字体选择使用SelectObject函数,GDI的字体映射器试图匹配与现有的物理字体逻辑字体。如果它未能找到完全匹配,它提供了一种替代的特征匹配尽可能要求的许多特点。
要获得对操作系统,请与LOGFONT结构特点EnumFontFamiliesEx所需的字体,不同的语言版本合适的字体检索相应的字体名称,并创建字体使用CreateFont或CreateFontIndirect。
当您不再需要的字体,调用DeleteObject函数将其删除。
许多东亚语言的字体有两种字体名称:英文名称和本地化的名称。 CreateFont和CreateFontIndirect只需要在一个系统区域设置相匹配的语言本地化的字体名称,而他们采取的所有其他系统区域设置的英文字体名称。最好的方法是尝试了一个名字,并在失败,请尝试其他。请注意,EnumFonts,EnumFontFamilies和EnumFontFamiliesEx返回英文字体名称,如果系统区域设置不匹配字体的语言。
对于CreateFont,CreateFontIndirect字体映射器,并CreateFontIndirectEx承认英文和本地化的字体名称,不论语言环境。
实例
有关示例,请参阅创建逻辑字体。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesCreateFontIndirectW(Unicode)和CreateFontIndirectA(ANSI)的
参见
字体和文字概述
字体和文本函数
CreateFont
CreateFontIndirectEx
DeleteObject
EnumFonts
EnumFontFamilies
EnumFontFamiliesEx
逻辑字体
SelectObject
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==CreateFontIndirect Function
The CreateFontIndirect function creates a logical font that has the specified characteristics. The font can subsequently be selected as the current font for any device context.
Syntax
HFONT CreateFontIndirect(
__in const LOGFONT *lplf
);
Parameters
lplf [in]
A pointer to a LOGFONT structure that defines the characteristics of the logical font.
Return Value
If the function succeeds, the return value is a handle to a logical font.
If the function fails, the return value is NULL.
Remarks
The CreateFontIndirect function creates a logical font with the characteristics specified in the LOGFONT structure. When this font is selected by using the SelectObject function, GDI's font mapper attempts to match the logical font with an existing physical font. If it fails to find an exact match, it provides an alternative whose characteristics match as many of the requested characteristics as possible.
To get the appropriate font on different language versions of the OS, call EnumFontFamiliesEx with the desired font characteristics in the LOGFONT structure, retrieve the appropriate typeface name, and create the font using CreateFont or CreateFontIndirect.
When you no longer need the font, call the DeleteObject function to delete it.
The fonts for many East Asian languages have two typeface names: an English name and a localized name. CreateFont and CreateFontIndirect take the localized typeface name only on a system locale that matches the language, while they take the English typeface name on all other system locales. The best method is to try one name and, on failure, try the other. Note that EnumFonts , EnumFontFamilies , and EnumFontFamiliesEx return the English typeface name if the system locale does not match the language of the font.
The font mapper for CreateFont , CreateFontIndirect, and CreateFontIndirectEx recognizes both the English and the localized typeface name, regardless of locale.
Examples
For an example, see Creating a Logical Font .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesCreateFontIndirectW (Unicode) and CreateFontIndirectA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
CreateFont
CreateFontIndirectEx
DeleteObject
EnumFonts
EnumFontFamilies
EnumFontFamiliesEx
LOGFONT
SelectObject
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183500(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 13:25:50