| |
|
|
|
Description:
SetCapture heading any Inputs the mouse a thread the angegebene Window circa. The detour becomes aufgehoben, if The API Capture Release called becomes, or one Window one others Threads whom Focus sustain.
Deklaration:
DEF @SetCapture(1) !USER32,SetCapture
Parameter:
1.Parameter: lever the Fensters, the The Mauseingaben detoured go should.
Return Value:
with success the lever the Fensters, the before The Mauseingaben detoured get. existing no solches Window, becomes 0 zurückgegeben. with one Error becomes 0 zurückgegeben.
Examples:
CompileMarkSeparationDEF @SetCapture(1) !"USER32","SetCapture"
DEF @ReleaseCapture(0) !"USER32","ReleaseCapture"
DEF @GetCapture(0) !"USER32","GetCapture"
Windowstyle 31+512
Windowtitle "Maus in Fenster einfangen!"
Window 0,0-640,440
Declare Release&,Set&,Message&
LET SET&=@CreateButton(%HWND,"Mauseingabe einfangen",10,50,250,30)
LET Release&=@CreateButton(%HWND,"Maus freilassen",10,100,250,30)
LET Message&=@CreateButton(%HWND,"Message ausgeben",10,150,250,30)
Whilenot %MENUITEM=-2
Drawtext 0,0,"Welches Fenster hat den Capture: "+@GetText$(@GetCapture())+@Space$(255)
Waitinput
IF @Getfocus(Set&)
@SetCapture(Release&)
ElseIF @Getfocus(Release&)
@ReleaseCapture()
@MessageBox("Maus wieder frei!","Release!",64)
ElseIF @Getfocus(Message&)
@MessageBox("Eingabe möglich","Test",64)
endif
Wend
[keywords:207ae34fbd] mouse Control Window Mauseingaben intercepting round up Messages redirecting Input Mausinput [/keywords:207ae34fbd] |
|
|
| |
|
|