EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

AddFontMemResourceEx function

The AddFontMemResourceEx function adds the font resource from a memory image to the system.

Syntax


HANDLE AddFontMemResourceEx(
  _In_  PVOID pbFont,
  _In_  DWORD cbFont,
  _In_  PVOID pdv,
  _In_  DWORD *pcFonts
);

Parameters

pbFont [in]

A pointer to a font resource.

cbFont [in]

The number of bytes in the font resource that is pointed to by pbFont.

pdv [in]

Reserved. Must be 0.

pcFonts [in]

A pointer to a variable that specifies the number of fonts installed.

Return value

If the function succeeds, the return value specifies the handle to the font added. This handle uniquely identifies the fonts that were installed on the system. If the function fails, the return value is zero. No extended error information is available.

Remarks

This function allows an application to get a font that is embedded in a document or a webpage. A font that is added by AddFontMemResourceEx is always private to the process that made the call and is not enumerable.

A memory image can contain more than one font. When this function succeeds, pcFonts is a pointer to a DWORD whose value is the number of fonts added to the system as a result of this call. For example, this number could be 2 for the vertical and horizontal faces of an Asian font.

When the function succeeds, the caller of this function can free the memory pointed to by pbFont because the system has made its own copy of the memory. To remove the fonts that were installed, call RemoveFontMemResourceEx. However, when the process goes away, the system will unload the fonts even if the process did not call RemoveFontMemResource.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Fonts and Text Overview
Font and Text Functions
RemoveFontMemResourceEx
SendMessage
DESIGNVECTOR

 

 

Contribuições da comunidade

Mostrar:
© 2014 Microsoft