From 9df9feb1d9938946d32c81851df5ed8b47851bba Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 19 Jan 2013 22:00:00 +0000 Subject: added remove frame git-svn-id: http://svn.miranda-ng.org/main/trunk@3185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BASS_interface/src/Main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index f7dd5cd3f6..5ea3e3e316 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -21,8 +21,6 @@ PLUGININFOEX pluginInfo = { {0x2f07ea05, 0x05b5, 0x4ff0, {0x87, 0x5d, 0xc5, 0x90, 0xda, 0x2d, 0xda, 0xc1}} }; -static HANDLE hService; -static HANDLE hTBButton; static HINSTANCE hBass = NULL; BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) @@ -51,6 +49,7 @@ static HWND ClistHWND; HWND hwndSlider = NULL, hwndMute = NULL, hwndOptSlider = NULL, hwnd_plugin = NULL; COLORREF clBack = 0; HBRUSH hBkgBrush = 0; +HANDLE frame_id = NULL; static int OnPlaySnd(WPARAM wParam, LPARAM lParam) { @@ -500,7 +499,7 @@ void CreateFrame() Frame.align = alBottom; Frame.Flags = F_TCHAR | F_VISIBLE | F_SHOWTB | F_SHOWTBTIP; Frame.height = 22; - DWORD frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0); + frame_id = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0); ColourIDT colourid = {0}; colourid.cbSize = sizeof(ColourIDT); @@ -589,6 +588,11 @@ int OnShutdown(WPARAM wParam, LPARAM lParam) FreeLibrary(hBass); } + if(hBkgBrush) + DeleteObject(hBkgBrush); + + CallService(MS_CLIST_FRAMES_REMOVEFRAME, (WPARAM)frame_id, 0); + return 0; } @@ -607,6 +611,5 @@ extern "C" int __declspec(dllexport) Load(void) extern "C" int __declspec(dllexport) Unload(void) { - DestroyServiceFunction(hService); return 0; } \ No newline at end of file -- cgit v1.2.3