HWND SetCapture(hWnd)
This function causes all subsequent mouse input to be sent to the window specified by the hWnd parameter, regardless of the position of the cursor.
Parameter | Type/Description |
hWnd | HWND Identifies the window that is to receive the mouse input. |
The return value identifies the window that previously received all mouse input. It is NULL if there is no such window.
When the window no longer requires all mouse input, the application should call the ReleaseCapture function so that other windows can receive mouse input.