Gdi::AddFontResourceW_I (Windows Embedded CE 6.0)
1/6/2010
This method adds the font resource from the specified file to the font table for Windows Embedded CE. Any Windows Embedded CE–based application can subsequently use the font for text output.
Syntax
static WINGDIAPI int WINAPI AddFontResourceW_I(
const WCHAR* lpszFilename
);
Parameters
lpszFilename
[in] Long pointer to a null-terminated string that contains a valid file name for a font file.The file name can specify a raw TrueType file (.ttf), a TrueType resource file (.fot), or a TrueType collection file (.ttc), ), a raw bitmap font file (.fnt), a raster resource file (.fon), a raw bitmap font file (.fnt), or a raster resource file (.fon).
Return Value
The number of fonts added indicates success.
Zero indicates failure.
To get extended error information, call GetLastError.
Remarks
This method is an internal version of the AddFontResource function.
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 the application loaded by calling the Gdi::AddFontResourceW_I method, the application must remove the resource by calling the Gdi::RemoveFontResourceW_I method.
Windows Embedded CE supports systems that use either TrueType or raster fonts but not both. The font type is chosen at system design time, and cannot be changed by an application.
Requirements
Header | gdi.hpp |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
Gdi
SendMessage
Gdi::RemoveFontResourceW_I