| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Mouse buttons and keyboard inquire (by Subclassing)
of Frank Abbing
Probiert time The Mouse buttons from and pressing one couple Keys.
These code basiert on Andreas Miethes preparatory work. On its XProfan-Page finds your
deeper gehende Subclassing-Sources.
$H windows.ph
$H Messages.ph
Def Hiword(1) And(&(1)>>16,$Ffff)
Def Loword(1) And(&(1),$Ffff)
Declare Ende&,Button&,Oldwindowproc&,Text$
Proc Windowproc
Parameters Wnd&, Msg&, Wparam&, Lparam&
If Msg& = ~Wm_close
~Postquitmessage(0)Program-end
Endif
Text$=Controlhandle: +Str $(Wnd&)+
~Textout(%Hdc,0,20,Addr(Text$),Len(Text$))
Text$=Message: +Str $(Msg&)+
~Textout(%Hdc,0,40,Addr(Text$),Len(Text$))
Text$=WParam: +Str $(Wparam&)+
~Textout(%Hdc,0,60,Addr(Text$),Len(Text$))
Text$=LParam: +Str $(Lparam&)+
~Textout(%Hdc,0,80,Addr(Text$),Len(Text$))
If Msg& = ~Wm_lbuttondown
Text$=Linker button becomes straight pressed.
~Textout(%Hdc,0,120,Addr(Text$),Len(Text$))
Elseif Msg& = ~Wm_lbuttonup
Text$=Linker button watts losgelassen.
~Textout(%Hdc,0,120,Addr(Text$),Len(Text$))
Elseif Msg& = ~Wm_rbuttondown
Text$=right button becomes straight pressed.
~Textout(%Hdc,0,140,Addr(Text$),Len(Text$))
Elseif Msg& = ~Wm_rbuttonup
Text$=right button watts losgelassen.
~Textout(%Hdc,0,140,Addr(Text$),Len(Text$))
Elseif Msg& = ~Wm_keydown
Text$=Button with Tastencode +Str $(Wparam&)+ becomes straight pressed.
~Textout(%Hdc,0,160,Addr(Text$),Len(Text$))
Elseif Msg& = ~Wm_keyup
Text$=
~Textout(%Hdc,0,160,Addr(Text$),Len(Text$))
Endif
any Messages The not treats get on The Original-procedure weiterleiten
Return ~Callwindowproc(Oldwindowproc&,Wnd&, Msg&, Wparam&, Lparam&)
Endproc
Set(FastMode,1)
Cls
Window-procedure replace and The Original-procedure in
OldWindowproc secure
Oldwindowproc& = ~Setwindowlong(%Hwnd,~Gwl_wndproc, Procaddr(Windowproc,4))
Whilenot Ende&
Waitinput
Endwhile
|
|
|
| |
|
|