windows_programming_notes.nbk: Home | Index | Next Page: GetClientRect | Previous Page: GetBValue


 GetCapture

The GetCapture function retrieves a handle to the window (if any) that has captured the mouse. Only one window at a time can capture the mouse; this window receives mouse input whether or not the cursor is within its borders.

Syntax

    HWND GetCapture(VOID);

Return Value

The return value is a handle to the capture window associated with the current thread. If no window in the thread has captured the mouse, the return value is NULL.

Remarks

A NULL return value means the current thread has not captured the mouse. However, it is possible that another thread or process has captured the mouse.

Windows 98/Me, Windows NT 4.0 SP3 and later: To get a handle to the capture window on another thread, use the [GetGUIThreadInfo] function.

Function Information



windows_programming_notes.nbk: Home | Index | Next Page: GetClientRect | Previous Page: GetBValue


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time