summaryrefslogtreecommitdiff
path: root/plugins/BASS_interface/src/Main.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-01-19 22:00:00 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-01-19 22:00:00 +0000
commit9df9feb1d9938946d32c81851df5ed8b47851bba (patch)
tree93f2ba12ca1d65f3596f4788ee68c770b34f5234 /plugins/BASS_interface/src/Main.cpp
parentdbdf11afc18bba5a7ac351716ec3477beabcff7e (diff)
added remove frame
git-svn-id: http://svn.miranda-ng.org/main/trunk@3185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BASS_interface/src/Main.cpp')
-rw-r--r--plugins/BASS_interface/src/Main.cpp11
1 files 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