From 691806256faf9a54a3f09897bdc88d46d92f8f29 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 25 Nov 2012 17:04:39 +0000 Subject: fix for options git-svn-id: http://svn.miranda-ng.org/main/trunk@2492 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NotesAndReminders/src/main.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'plugins/NotesAndReminders/src/main.cpp') diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 1d2134301a..0553a91d6d 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -340,6 +340,7 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID lpvReserved) extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfo); + hmiranda = GetModuleHandle(NULL); INITCOMMONCONTROLSEX ctrls = {0}; ctrls.dwSize = sizeof(INITCOMMONCONTROLSEX); @@ -349,33 +350,28 @@ extern "C" __declspec(dllexport) int Load(void) g_isWin2kPlus = IsWinVer2000Plus(); hRichedDll = LoadLibrary(_T("RICHED20.DLL")); - if (!hRichedDll) - { + if (!hRichedDll) { if (MessageBox(0, TranslateT("Miranda could not load the Note & Reminders plugin, RICHED20.DLL is missing. If you are using Windows 95 or WINE please make sure you have riched20.dll installed. Press 'Yes' to continue loading Miranda."), _T(SECTIONNAME), MB_YESNO | MB_ICONINFORMATION) != IDYES) return 1; return 0; } hUserDll = LoadLibrary(_T("user32.dll")); - if (hUserDll) - { + if (hUserDll) { MySetLayeredWindowAttributes = (BOOL (WINAPI *)(HWND,COLORREF,BYTE,DWORD))GetProcAddress(hUserDll,"SetLayeredWindowAttributes"); MyMonitorFromWindow = (HANDLE (WINAPI*)(HWND,DWORD))GetProcAddress(hUserDll,"MonitorFromWindow"); } - else - { + else { MySetLayeredWindowAttributes = NULL; MyMonitorFromWindow = NULL; } hKernelDll = LoadLibrary(_T("kernel32.dll")); - if (hKernelDll) - { + if (hKernelDll) { MyTzSpecificLocalTimeToSystemTime = (BOOL (WINAPI*)(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME))GetProcAddress(hKernelDll,"TzSpecificLocalTimeToSystemTime"); MySystemTimeToTzSpecificLocalTime = (BOOL (WINAPI*)(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME))GetProcAddress(hKernelDll,"SystemTimeToTzSpecificLocalTime"); } - else - { + else { MyTzSpecificLocalTimeToSystemTime = NULL; MySystemTimeToTzSpecificLocalTime = NULL; } @@ -387,4 +383,4 @@ extern "C" __declspec(dllexport) int Load(void) InitIcons(); return 0; -} \ No newline at end of file +} -- cgit v1.2.3