blob: f0d0844aa58bd8e12d11edf997afd5ea11b522cf (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#include "common.h"
#include "icons.h"
#include "resource.h"
HICON hIconRemove, hIconKeep, hIconClear;
HANDLE hIcoLibIconsChanged = 0;
int ReloadIcons(WPARAM wParam, LPARAM lParam) {
hIconRemove = Skin_GetIcon(MODULE "_remove");
hIconKeep = Skin_GetIcon(MODULE "_keep");
hIconClear = Skin_GetIcon(MODULE "_clear");
return 0;
}
void InitIcons()
{
TCHAR path[MAX_PATH];
GetModuleFileName(hInst,path,MAX_PATH);
SKINICONDESC sid = { sizeof(sid) };
sid.pszSection = MODULE;
sid.flags = SIDF_PATH_TCHAR;
sid.ptszDefaultFile = path;
sid.pszDescription = LPGEN("Disable");
sid.pszName = MODULE "_remove";
sid.iDefaultIndex = -IDI_HREMOVE;
Skin_AddIcon(&sid);
sid.pszDescription = LPGEN("Enable");
sid.pszName = MODULE "_keep";
sid.iDefaultIndex = -IDI_HKEEP;
Skin_AddIcon(&sid);
sid.pszDescription = LPGEN("Clear");
sid.pszName = MODULE "_clear";
sid.iDefaultIndex = -IDI_HCLEAR;
Skin_AddIcon(&sid);
ReloadIcons(0, 0);
hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
}
void DeinitIcons() {
if(hIcoLibIconsChanged)
UnhookEvent(hIcoLibIconsChanged);
}
|