BOOL RemoveFontResource(lpFilename)
This function removes an added font resource from the file named by the lpFilename parameter or from the Windows font table.
Parameter | Type/Description |
lpFilename | LPSTR Points to a string that names the font-resource file or contains a handle to a loaded module. If lpFilename points to the font-resource filename, the string must be null-terminated and have the DOS filename format. If lpFilename contains a handle, the handle must be in the low-order word; the high-order word must be zero. |
The return value specifies the outcome of the function. It is nonzero if the function is successful. Otherwise, it is zero.
Any application that adds or removes fonts from the Windows 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 to the resource, the font resource remains loaded until the last referencing logical font has been deleted by using the DeleteObject function.