blob: 60d1e77e10227cfeaca62ac6f8372431a1e7a0bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#pragma once
#include <atlcoll.h>
class CFontInstaller
{
HANDLE (WINAPI *pAddFontMemResourceEx)(PVOID,DWORD,PVOID,DWORD*);
BOOL (WINAPI *pRemoveFontMemResourceEx)(HANDLE);
int (WINAPI *pAddFontResourceEx)(LPCTSTR,DWORD,PVOID);
BOOL (WINAPI *pRemoveFontResourceEx)(LPCTSTR,DWORD,PVOID);
BOOL (WINAPI *pMoveFileEx)(LPCTSTR, LPCTSTR,DWORD);
CAtlList<HANDLE> m_fonts;
CAtlList<CString> m_files;
bool InstallFontMemory(const void* pData, UINT len);
bool InstallFontFile(const void* pData, UINT len);
public:
CFontInstaller();
virtual ~CFontInstaller();
bool InstallFont(const CAtlArray<BYTE>& data);
bool InstallFont(const void* pData, UINT len);
void UninstallFonts();
};
|