English
Source / code snippets

inquire Mouse buttons Per Subclassing keyboard - 2

 

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

 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.264 Views

Untitledvor 0 min.
H.Brill10/08/23
RudiB.09/11/22
Sven Bader08/02/21
Andre Rohland06/13/19
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie