[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
RemoveFontResource( cFontName | hFontResource )-> <lSuccess>
------------------------------------------------------------------------------
PARAMETER:
<cFontName> or <hFontResource> identifies the name of the font resource
file or the handle of a resource module that supplied that font.
RETURNS:
<lSuccess> is TRUE if the operation was successful.
DESCRIPTION:
Any application that adds or removes fonts from Windows font table should
send a WM_FONTCHANGE message to all top-level windows in the system
by using the SendMessage function with the hwnd parameter set to -1
(HWND_BROADCAST ).
In some cases, RemoveFont() may not remove the font resource immediately.
If there are outstanding references to the resource, it remains loaded
until the last logical font using it has been removed (deleted) by using
the DeleteObject function.
EXAMPLE:
+--------------------------------------------------------------+
| /* Add and then remove a Font */ |
| AddFontResource( "Miami.fon" ) |
| SendMessage( HWND_BROADCAST, WM_FONTCHANGE, 0, 0 ) |
| [ .. use the font .. ] |
| |
| IF( RemoveFontResource( "Miami.fon" ) |
| SendMessage( HWND_BROADCAST. WM_FONTCHANGE, 0,0 ) |
| ENDIF |
| |
+--------------------------------------------------------------+
SOURCE:
SOURCE\WINAPI\FONTCREA.C
See Also:
AddFontResource
SendMessage
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson