Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CWnd::SetCapture

 

Causes all subsequent mouse input to be sent to the current CWnd object regardless of the position of the cursor.


CWnd* SetCapture();

A pointer to the window object that previously received all mouse input. It is NULL if there is no such window. The returned pointer may be temporary and should not be stored for later use.

When CWnd no longer requires all mouse input, the application should call the ReleaseCapture function so that other windows can receive mouse input.

While mouse input is captured, no WM_NCHITTEST or WM_SETCURSOR messages are sent to the active window.

Requirements

Header: afxwin.h

Show: