Inside the CDrawDragRect
class the function void DrawDragRect(MouseEventArgs e)
is the one responsible for this feature. This is called in response to the OnMouseMove(MouseEventArgs e)
event of the form. As one can see, Win32 APIs (through pInvoke
) are generously used in the implementation of this feature.
The DrawDragRect(MouseEventArgs e)
API first goes on to create 4 Windows regions:
rgnOld
rgnNew
rgnDiff
rgnDiffOld