RemoveFontResource

  BOOL RemoveFontResource(lpFileName)    
  LPTSTR lpFileName;    

The RemoveFontResource function removes the fonts in the file identified by lpFileName from the font table.

Parameters

lpFileName

Points to a null-terminated character string that names the font-resource file.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

Comments

The RemoveFontResource function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set.

Any application that adds or removes fonts from the Windows public font table should notify other windows of the change by using the SendMessage function with the hwnd parameter set to -1 to send a WM_FONTCHANGE message to all top-level windows in the system.

The RemoveFontResource function may not actually remove the font resource. If there are outstanding references the font resource remains loaded until no device context is using it.

See Also

AddFontResource, SendMessage