From 690f5e6d29d1c85c4be72638eb22843964c2f512 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 24 Apr 2015 08:21:28 +0000 Subject: All non-working stuff moved from trunk git-svn-id: http://svn.miranda-ng.org/main/trunk@13071 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../MagneticWindows/src/SnapToListService.cpp | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 plugins/!Deprecated/MagneticWindows/src/SnapToListService.cpp (limited to 'plugins/!Deprecated/MagneticWindows/src/SnapToListService.cpp') diff --git a/plugins/!Deprecated/MagneticWindows/src/SnapToListService.cpp b/plugins/!Deprecated/MagneticWindows/src/SnapToListService.cpp deleted file mode 100644 index 586fa594b1..0000000000 --- a/plugins/!Deprecated/MagneticWindows/src/SnapToListService.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "MagneticWindowsCore.h" - -INT_PTR SnapToList(WPARAM wParam, LPARAM Align) -{ - HWND hWnd, hWndList; - RECT WndRect, ListRect; - RECT AlignRect; - RECT ResultRect; - - hWnd = (HWND)wParam; - - hWndList = (HWND)CallService(MS_CLUI_GETHWND,0,0); - GetWindowRect(hWnd, &WndRect); - GetWindowRect(hWndList, &ListRect); - - AlignRect = ListRect; - if ((!(MS_MW_STL_List_Left & Align)) && (MS_MW_STL_List_Right & Align)) { - AlignRect.left = AlignRect.right; - } else - if ((MS_MW_STL_List_Left & Align) && (!(MS_MW_STL_List_Right & Align))) { - AlignRect.right = AlignRect.left; - } - - if ((!(MS_MW_STL_List_Top & Align)) && (MS_MW_STL_List_Bottom & Align)) { - AlignRect.top = AlignRect.bottom; - } else - if ((MS_MW_STL_List_Top & Align) && (!(MS_MW_STL_List_Bottom & Align))) { - AlignRect.bottom = AlignRect.top; - } - - ResultRect = WndRect; - if ((MS_MW_STL_Wnd_Left & Align) && (MS_MW_STL_Wnd_Right & Align)) { - ResultRect.left = AlignRect.left; - ResultRect.right = AlignRect.right; - } else - if ((!(MS_MW_STL_Wnd_Left & Align)) && (MS_MW_STL_Wnd_Right & Align)) { - ResultRect.left = AlignRect.right - (WndRect.right - WndRect.left); - ResultRect.right = AlignRect.right; - } else - if ((MS_MW_STL_Wnd_Left & Align) && (!(MS_MW_STL_Wnd_Right & Align))) { - ResultRect.left = AlignRect.left; - ResultRect.right = AlignRect.left + (WndRect.right - WndRect.left); - } - - if ((MS_MW_STL_Wnd_Top & Align) && (MS_MW_STL_Wnd_Bottom & Align)) { - ResultRect.top = AlignRect.top; - ResultRect.bottom = AlignRect.bottom; - } else - if ((!(MS_MW_STL_Wnd_Top & Align)) && (MS_MW_STL_Wnd_Bottom & Align)) { - ResultRect.top = AlignRect.bottom - (WndRect.bottom - WndRect.top); - ResultRect.bottom = AlignRect.bottom; - } else - if ((MS_MW_STL_Wnd_Top & Align) && (!(MS_MW_STL_Wnd_Bottom & Align))) { - ResultRect.top = AlignRect.top; - ResultRect.bottom = AlignRect.top + (WndRect.bottom - WndRect.top); - } - - MoveWindow(hWnd, ResultRect.left, ResultRect.top, ResultRect.right-ResultRect.left, ResultRect.bottom-ResultRect.top, true); - - return 0; -} \ No newline at end of file -- cgit v1.2.3