diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-10-28 20:12:50 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-10-28 20:12:50 +0000 |
commit | 679b23b4d1c5b2d935085b199d9327bec8477378 (patch) | |
tree | 1ba71e9c6d153b777a9fb142d8b79c0ce8354582 /plugins/MirLua/src/mlua_icons.cpp | |
parent | 13a2213b0aaf3778221bb4caf010f7696c57be30 (diff) |
MirLua:
- internal icons added to iconlib
- minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15641 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_icons.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_icons.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/MirLua/src/mlua_icons.cpp b/plugins/MirLua/src/mlua_icons.cpp new file mode 100644 index 0000000000..7b0e9c37f3 --- /dev/null +++ b/plugins/MirLua/src/mlua_icons.cpp @@ -0,0 +1,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;
+}
\ No newline at end of file |