summaryrefslogtreecommitdiff
path: root/plugins/Alarms/src/alarms.cpp
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2018-05-15 22:46:30 +0300
committerMataes <mataes2007@gmail.com>2018-05-15 22:46:50 +0300
commit8cd3e043ccb6acb688ba87260f115380e0f126f5 (patch)
treef66c58eddc3da0f2b0e4e02042f5147885145614 /plugins/Alarms/src/alarms.cpp
parent6ff82a72b71676b2a83f205e7ca97fced87e47b9 (diff)
Alarms: cmplugin adaptation
Diffstat (limited to 'plugins/Alarms/src/alarms.cpp')
-rw-r--r--plugins/Alarms/src/alarms.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index 1ee20d6f8f..b2e01d91e1 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -8,7 +8,6 @@ There is no warranty.
*/
#include "stdafx.h"
-#include "alarms.h"
#define SERVICENAME L"mp"
#define COMMANDPREFIX L"/" SERVICENAME
@@ -19,7 +18,7 @@ There is no warranty.
wchar_t szGamePrefix[] = COMMANDPREFIX;
CLIST_INTERFACE *pcli;
-HINSTANCE hInst;
+CMPlugin g_plugin;
int hLangpack;
HANDLE hTopToolbarButton;
@@ -37,12 +36,6 @@ PLUGININFOEX pluginInfo = {
{0x4dd7762b, 0xd612, 0x4f84, {0xaa, 0x86, 0x6, 0x8f, 0x17, 0x85, 0x9b, 0x6d}}
};
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
-{
- hInst = hinstDLL;
- return TRUE;
-}
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
@@ -87,7 +80,7 @@ void ShowPopup(MCONTACT hContact, const wchar_t *msg)
HBITMAP LoadBmpFromIcon(int IdRes)
{
- HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IdRes));
+ HICON hIcon = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IdRes));
BITMAPINFOHEADER bih = { 0 };
bih.biSize = sizeof(bih);
@@ -124,8 +117,8 @@ HBITMAP LoadBmpFromIcon(int IdRes)
static int InitTopToolbarButton(WPARAM, LPARAM)
{
TTBButton ttb = {};
- ttb.hIconUp = LoadIcon(hInst, MAKEINTRESOURCE(IDI_TBUP));
- ttb.hIconDn = LoadIcon(hInst, MAKEINTRESOURCE(IDI_TBDN));
+ ttb.hIconUp = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_TBUP));
+ ttb.hIconDn = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_TBDN));
ttb.pszService = MODULE "/NewAlarm";
ttb.dwFlags = TTBBF_VISIBLE;
ttb.name = ttb.pszTooltipUp = LPGEN("Set alarm");