网站首页  词典首页

请输入您要查询的函数:

 

术语 addfontresource
释义 AddFontResource
语法:
int AddFontResource(
__in LPCTSTR lpszFilename
);
AddFontResource功能
函数添加的AddFontResource从指定的文件到系统字体表的字体资源。字体随后可以用于任何应用程序的文本输出。
要标记为私人或不枚举,使用AddFontResourceEx功能字体。
参数
lpszFilename [in]
一个指向 null 结尾的字符串指针,其中包含一个有效的字体文件名。此参数可以指定下列任何文件。
文件ExtensionMeaning
。fonFont资源文件。
。fntRaw位图字体文件。
。ttfRaw TrueType字体文件。
。ttcEast亚洲视窗:TrueType字体的集合。
。fotTrueType资源文件。
。otfPostScript OpenType字体。
。mmmMultiple主Type1字体资源文件。必须使用。PFM和。PFB文件。
。pfbType 1字体位文件。这是一起使用。烤瓷文件。
。pfmType 1字体度量文件。这是一起使用。五氟苯文件。
要添加的字体的信息来了,从几个资源文件有lpszFileName指向一个分隔的文件名字符串“|” -例如,abcxxxxx.pfm | abcxxxxx.pfb。
返回值
如果函数成功,返回值指定字体的数量增加。
如果函数失败,返回值是零。没有扩展的错误信息是可用。
备注
任何应用程序添加或删除表中的系统字体的字体,必须事先通过发送WM_FONTCHANGE所有顶级消息在窗口操作系统级的变化的其他窗口。应用程序应该通过调用发送SendMessage函数和设置hwnd参数为HWND_BROADCAST此消息。
当一个应用程序不再需要一个字体资源,它通过调用AddFontResource函数加载时,它必须删除通过调用RemoveFontResource函数资源。
此功能只安装了本届会议的字体。当系统重新启动后,字体将不存在。有字体,即使重新启动系统后,安装,字体必须列在注册表中。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesAddFontResourceW(Unicode)和AddFontResourceA(ANSI)的
参见
字体和文字概述
字体和文本函数
AddFontResourceEx
RemoveFontResource
SendMessage消息
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==AddFontResource Function
The AddFontResource function adds the font resource from the specified file to the system font table. The font can subsequently be used for text output by any application.
To mark a font as private or not enumerable, use the AddFontResourceEx function.
Syntax
int AddFontResource(
__in LPCTSTR lpszFilename
);
Parameters
lpszFilename [in]
A pointer to a null-terminated character string that contains a valid font file name. This parameter can specify any of the following files.
File ExtensionMeaning
.fonFont resource file.
.fntRaw bitmap font file.
.ttfRaw TrueType file.
.ttcEast Asian Windows: TrueType font collection.
.fotTrueType resource file.
.otfPostScript OpenType font.
.mmmMultiple master Type1 font resource file. It must be used with .pfm and .pfb files.
.pfbType 1 font bits file. It is used with a .pfm file.
.pfmType 1 font metrics file. It is used with a .pfb file.

To add a font whose information comes from several resource files, have lpszFileName point to a string with the file names separated by a "|" --for example, abcxxxxx.pfm | abcxxxxx.pfb.
Return Value
If the function succeeds, the return value specifies the number of fonts added.
If the function fails, the return value is zero. No extended error information is available.
Remarks
Any application that adds or removes fonts from the system font table should notify other windows of the change by sending a WM_FONTCHANGE message to all top-level windows in the operating system. The application should send this message by calling the SendMessage function and setting the hwnd parameter to HWND_BROADCAST.
When an application no longer needs a font resource that it loaded by calling the AddFontResource function, it must remove that resource by calling the RemoveFontResource function.
This function installs the font only for the current session. When the system restarts, the font will not be present. To have the font installed even after restarting the system, the font must be listed in the registry.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesAddFontResourceW (Unicode) and AddFontResourceA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
AddFontResourceEx
RemoveFontResource
SendMessage
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183326(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 11:29:17