Is there a way to detect when a window that doesn't belong to my application is being dragged in windows using python/pywin32? I want to set it up so that when I drag a window whose title matches a pattern near the desktop edge, it snaps to the edge when the mouse is let go. I could write code to snap all windows with that title to the desktop whenever the mouse is released, but I want to only move the particular window that was being dragged.
So far the only possible solution I see is to use SetWindowsHookEx. Pywin32 doesn't interface this, so I think I'll have to do something like this:

Write a C extension module. It has a function like setCallback which takes a python function to be called when the drag event happens. 
Write a C DLL that contains the actual hook into windows. This DLL will somehow have to call the python function that is currently set.

I'm not sure how to do these, or if it's correct, though..
python+win32: detect window drag