Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1 KB

sample_282.md

File metadata and controls

44 lines (30 loc) · 1 KB

Home

Setting the mouse capture to the specified window

Before you begin:

See also:


Code:

DO declare

* testing the capture
? GetCapture()

* setting the mouse capture to the window with the keyboard focus
? SetCapture(GetFocus())

* testing the capture
? GetCapture()  && returns a window handle

= ReleaseCapture()

PROCEDURE declare
	DECLARE INTEGER SetCapture IN user32 INTEGER hWindow
	DECLARE INTEGER GetCapture IN user32
	DECLARE INTEGER ReleaseCapture IN user32

	DECLARE INTEGER GetActiveWindow IN user32
	DECLARE INTEGER GetFocus IN user32  

Listed functions:

GetActiveWindow
GetCapture
GetFocus
ReleaseCapture
SetCapture