summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI/m_Snapping_windows.h
blob: 3aa505fe74dd1feba7dccaa57d9296761d0d34ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SNAPPING_WINDOWS_H
#define SNAPPING_WINDOWS_H

/*
If you want to use SnappingWindows in you plugin you should add this code in WindowProc:

BOOL CALLBACK YouWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	CallSnappingWindowProc(hwnd,msg,wParam,lParam);
	//
	switch (msg)
	{
		case:.....
		...........
	}
	return ......
}


*/

struct SnapWindowProc_t
{
	HWND hWnd;
	//
	SIZE m_szMoveOffset;
	WPARAM wParam;
	LPARAM lParam;
	//
	int Reserved1;
	int Reserved2;
	int Reserved3;
};

#define CallSnappingWindowProc(hwnd,nMessage,wParam,lParam) {static struct SnapWindowProc_t SnapInfo;\
								if ((nMessage == WM_MOVING) || (nMessage == WM_NCLBUTTONDOWN) || (nMessage == WM_SYSCOMMAND)){\
								SnapInfo.hWnd = hwnd;\
								SnapInfo.wParam = wParam;\
								SnapInfo.lParam = lParam;\
								CallService("Utils/SnapWindowProc",(WPARAM)&SnapInfo,nMessage);}}

#endif //SNAPPING_WINDOWS_H