summaryrefslogtreecommitdiff
path: root/include/m_popup.h
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 /include/m_popup.h
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 'include/m_popup.h')
-rw-r--r--include/m_popup.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/m_popup.h b/include/m_popup.h
index b715345c40..1a633ac14b 100644
--- a/include/m_popup.h
+++ b/include/m_popup.h
@@ -332,7 +332,22 @@ typedef struct {
// wParam = 0
// lParam = (POPUPCLASS *)&pc
-#define MS_POPUP_REGISTERCLASS "PopUp/RegisterClass"
+#define MS_POPUP_REGISTERCLASS "PopUp/RegisterClass"
+
+HANDLE __forceinline Popup_RegisterClass(POPUPCLASS *pc)
+{
+ if ( !ServiceExists(MS_POPUP_REGISTERCLASS))
+ return NULL;
+ return (HANDLE)CallService(MS_POPUP_REGISTERCLASS, 0, LPARAM(pc));
+}
+
+#define MS_POPUP_UNREGISTERCLASS "PopUp/UnregisterClass"
+
+void __forceinline Popup_UnregisterClass(HANDLE ppc)
+{
+ if (ppc)
+ CallService(MS_POPUP_UNREGISTERCLASS, 0, LPARAM(ppc));
+}
typedef struct {
int cbSize;