#include <MDISnapper.h>
Since it only works on coordinate rects, it can be used without any actual Windows. To use it:
Definition at line 21 of file MDISnapper.h.
Public Methods | |
| void | Init (RECT const &oldRect, RECT const &newRect, DWORD snapwidth) |
| Initialize, specifying a pre-move and post-move
rect. | |
| void | Init (RECT const &r, DWORD snapWidth, bool moveOnly=false) |
| Initialize, specifying only one rectangle. | |
| void | SnapHLine (long y) |
| snap to a horizontal line | |
| void | SnapVLine (long x) |
| snap to a vertical line | |
| RECT & | EndSnap () |
| ends snapping sequence and returns final
coords | |
Data Fields | |
| DWORD | snapWidth |
| distance over which snapping
works | |
| RECT | rold |
| original rect | |
| RECT | rnew |
| post-move rect (if
specified) | |
| RECT | rout |
| accumulates the final
rect | |
| ||||||||||||||||
|
Initialize, specifying a pre-move and post-move rect. use this method if the window is about to be moved or resized (e.g. in WM_SIZING or WM_MOVING handler)
Definition at line 40 of file MDISnapper.cpp. |
| ||||||||||||||||
|
Initialize, specifying only one rectangle.
Definition at line 67 of file MDISnapper.cpp. |
|
|
snap to a horizontal line
Definition at line 122 of file MDISnapper.cpp. |
|
|
snap to a vertical line
Definition at line 84 of file MDISnapper.cpp. |
1.3-rc2