summaryrefslogtreecommitdiff
path: root/plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-06-29 06:56:07 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-06-29 06:56:07 +0000
commita2795725f5afc756a405a85c192bdd53b967999d (patch)
tree08548adc194d0c2a960120a342bac02208c3e23f /plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc
parentaf7e438cfe8ce85e1da234318ed1584e89d952cc (diff)
Added my Miranda API pascal version
Changed ShlExt to my API compilation (32 bit FPC now only) git-svn-id: http://svn.miranda-ng.org/main/trunk@679 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc')
-rw-r--r--plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc b/plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc
new file mode 100644
index 0000000000..e3c513482a
--- /dev/null
+++ b/plugins/Pascal_Headers/reserve/helpers/m_snapping_windows.inc
@@ -0,0 +1,35 @@
+{$IFNDEF SNAPPING_WINDOWS}
+{$DEFINE SNAPPING_WINDOWS}
+
+type
+ PSnapWindowProc = ^TSnapWindowProc;
+ TSnapWindowProc = record
+ hWnd : THWND;
+ m_szMoveOffset : TSIZE;
+ wParam : WPARAM;
+ lParam : LPARAM;
+ Reserved1 : int;
+ Reserved2 : int;
+ Reserved3 : int;
+ end;
+
+const
+ MS_SNAPWINDOWPROC = 'Utils/SnapWindowProc';
+
+function CallSnappingWindowProc(hwnd:hwnd; nMessage:int;
+ wParam:WPARAM;lParam:LPARAM):int;// cdecl;
+const
+ SnapInfo:TSnapWindowProc=();
+begin
+ result:=0;
+ if (nMessage=WM_MOVING) or (nMessage=WM_NCLBUTTONDOWN) or
+ (nMessage=WM_SYSCOMMAND) or (nMessage=WM_SIZING) then
+ begin
+ SnapInfo.hWnd := hwnd;
+ SnapInfo.wParam := wParam;
+ SnapInfo.lParam := lParam;
+ CallService(MS_SNAPWINDOWPROC,WPARAM(@SnapInfo),nMessage);
+ if nMessage=WM_SIZING then result:=1;
+ end;
+end;
+{$ENDIF}