blob: 7b0e9c37f35e75f49f8c867bbc8a302d6761927c (
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
 | #include "stdafx.h"
IconItemT Icons[] =
{
	{ LPGENT("Script"),			"script",			IDI_SCRIPT		},
	{ LPGENT("Open"),			"open",				IDI_OPEN		},
	{ LPGENT("Reload")	,		"reload",			IDI_RELOAD		},
};
void InitIcons()
{
	Icon_RegisterT(g_hInstance, LPGENT(MODULE), Icons, _countof(Icons), MODULE);
}
HICON GetIcon(int iconId)
{
	for (size_t i = 0; i < _countof(Icons); i++)
		if (Icons[i].defIconID == iconId)
			return IcoLib_GetIconByHandle(Icons[i].hIcolib);
	return NULL;
}
HANDLE GetIconHandle(int iconId)
{
	for (size_t i = 0; i < _countof(Icons); i++)
		if (Icons[i].defIconID == iconId)
			return Icons[i].hIcolib;
	return NULL;
}
 |