| |
|
|
| iF (23.01.11)
Nebenbeispiel To Jörgs rClicked ( [...] ) : {$cleq}
Cls
Declare hButton1&,hButton2&,hButton3&
hButton1& = someMessagesToUserMessages(Create("Button",%hwnd,"Test 1",10,50,48,20),0,0,0)
hButton2& = someMessagesToUserMessages(Create("Button",%hwnd,"Test 2",10,80,48,20),0,0,0)
hButton3& = someMessagesToUserMessages(Create("Button",%hwnd,"Test 3",10,110,48,20),0,0,0)
userMessages wm_rButtonDown,wm_rButtonDblClk,wm_lButtonDown,wm_lButtonDblClk
While 1
WaitInput
select uMessage
caseof wm_rButtonDown
select uwParam
caseof hButton1&
print "Button1 rechts"
caseof hButton2&
print "Button2 rechts"
caseof hButton3&
print "Button2 rechts"
endSelect
caseof wm_rButtonDblClk
select uwParam
caseof hButton1&
print "Button1 doppelrechts"
caseof hButton2&
print "Button2 doppelrechts"
caseof hButton3&
print "Button2 doppelrechts"
endSelect
caseof wm_lButtonDown
select uwParam
caseof hButton1&
print "Button1 links"
caseof hButton2&
print "Button2 links"
caseof hButton3&
print "Button2 links"
endSelect
caseof wm_lButtonDblClk
select uwParam
caseof hButton1&
print "Button1 doppellinks"
caseof hButton2&
print "Button2 doppellinks"
caseof hButton3&
print "Button2 doppellinks"
endSelect
endSelect
Wend
nProc someMessagesToUserMessages
parameters wnd&,msg&,wp&,lp&
var owp&=getWindowLong(wnd&,gwl_userData)
ifnot owp&
setWindowLong(wnd&,gwl_userData,setWindowLong(wnd&,gwl_wndProc,procaddr(someMessagesToUserMessages,4)))
else
case msg&=wm_rButtonDown or msg&=wm_rButtonDblClk or msg&=wm_lButtonDown or msg&=wm_lButtonDblClk : sendMessage(%hWnd,msg&,wnd&,lp&)
return callWindowProc(owp&,wnd&,msg&,wp&,lp&)
endif
return wnd&
endproc
|
|
|
| |
|
|