Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Как удалить шрифт из системы по его названию? [D6, D7, WinXP]


Dark Lord ©   (2005-12-30 21:07:00) 

Здравствуйте! Такая вот проблемка... Ведь обозначение шрифта в Винде и название самого файла шрифта как обычно разные... Как тогда зная просто одно название удалить файл?


TUser   (2006-01-02 11:31:00) [1]

The RemoveFontResource function removes the fonts in the specified file from the Windows font table.

BOOL RemoveFontResource(

   LPCTSTR lpFileName  // address of font-resource filename  
  );


Parameters

lpFileName

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



Return Values

If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

An application that adds or removes fonts from the Windows public font table should notify other windows of the change by sending a WM_FONTCHANGE message to all top-level windows in the system. The application sends this message by calling the SendMessage function with the hwnd parameter set to HWND_BROADCAST.
If there are outstanding references to a font, the associated resource remains loaded until no device context is using it.

See Also

AddFontResource, SendMessage


n0name   (2005-12-31 08:06:00) [2]

int EnumFontFamiliesEx(
 HDC hdc,                          // handle to DC
 LPLOGFONT lpLogfont,              // font information
 FONTENUMPROC lpEnumFontFamExProc, // callback function
 LPARAM lParam,                    // additional data
 DWORD dwFlags                     // not used; must be 0
);

int CALLBACK EnumFontFamExProc(
 ENUMLOGFONTEX *lpelfe,    // logical-font data
 NEWTEXTMETRICEX *lpntme,  // physical-font data
 DWORD FontType,           // type of font
 LPARAM lParam             // application-defined data
);

typedef struct tagENUMLOGFONTEX {
 LOGFONT  elfLogFont;
 TCHAR  elfFullName[LF_FULLFACESIZE];
 TCHAR  elfStyle[LF_FACESIZE];
 TCHAR  elfScript[LF_FACESIZE];
} ENUMLOGFONTEX, *LPENUMLOGFONTEX;


Наверх

Титульная страница Поиск, карта сайта Написать письмо