Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FontInstaller.h « DSUtil « src - github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b8eeeb8b4782fd6123bddba694f8ced45431c76f (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();
};