summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_misc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-17 14:22:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-17 14:22:17 +0000
commit15267ea2d489606fb4b99d011bc3ea7c2a644a9f (patch)
tree607fb948632ec8b348508cbd08ef41fffe21d8c2 /protocols/MSN/src/msn_misc.cpp
parent5e6e1e8838fe7637ef588e0fb080ad07fc5700aa (diff)
fix for popup-related memory leaks
git-svn-id: http://svn.miranda-ng.org/main/trunk@4077 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_misc.cpp')
-rw-r--r--protocols/MSN/src/msn_misc.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index e6b86d244f..f39fe781c0 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -974,33 +974,27 @@ void CMsnProto::InitPopups(void)
TCHAR desc[256];
char name[256];
- POPUPCLASS ppc = {0};
- ppc.cbSize = sizeof(ppc);
+ POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
ppc.PluginWindowProc = NullWindowProc;
-
ppc.hIcon = LoadIconEx("main");
-
ppc.ptszDescription = desc;
ppc.pszName = name;
+
ppc.colorBack = RGB(173, 206, 247);
ppc.colorText = GetSysColor(COLOR_WINDOWTEXT);
ppc.iSeconds = 3;
mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Hotmail"));
mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Hotmail");
- CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&ppc);
+ hPopupHotmail = Popup_RegisterClass(&ppc);
- ppc.ptszDescription = desc;
- ppc.pszName = name;
ppc.colorBack = RGB(173, 206, 247);
ppc.colorText = GetSysColor(COLOR_WINDOWTEXT);
ppc.iSeconds = 3;
mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Notify");
- CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&ppc);
+ hPopupNotify = Popup_RegisterClass(&ppc);
- ppc.ptszDescription = desc;
- ppc.pszName = name;
ppc.hIcon = (HICON)LoadImage(NULL, IDI_WARNING, IMAGE_ICON, 0, 0, LR_SHARED);
ppc.colorBack = RGB(191, 0, 0); //Red
ppc.colorText = RGB(255, 245, 225); //Yellow
@@ -1008,7 +1002,7 @@ void CMsnProto::InitPopups(void)
mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
- CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&ppc);
+ hPopupError = Popup_RegisterClass(&ppc);
}
/////////////////////////////////////////////////////////////////////////////////////////