| |
|
|
| IF (23.01.11)
Nebenbeispiel a Jörgs rClicked ( [...] ) : {$cleq}
Cls
Declarar hButton1&,hButton2&,hButton3&
hButton1& = someMessagesToUserMessages(Crear("Button",%hwnd,"Test 1",10,50,48,20),0,0,0)
hButton2& = someMessagesToUserMessages(Crear("Button",%hwnd,"Test 2",10,80,48,20),0,0,0)
hButton3& = someMessagesToUserMessages(Crear("Button",%hwnd,"Test 3",10,110,48,20),0,0,0)
mensajes de los usuarios WM_RBUTTONDOWN,wm_rButtonDblClk,wm_lButtonDown,wm_lButtonDblClk
Mientras que 1
WaitInput
seleccionar uMessage
caseof WM_RBUTTONDOWN
seleccionar uwParam
caseof hButton1&
imprimir "Button1 rechts"
caseof hButton2&
imprimir "Button2 rechts"
caseof hButton3&
imprimir "Button2 rechts"
EndSelect
caseof wm_rButtonDblClk
seleccionar uwParam
caseof hButton1&
imprimir "Button1 doppelrechts"
caseof hButton2&
imprimir "Button2 doppelrechts"
caseof hButton3&
imprimir "Button2 doppelrechts"
EndSelect
caseof wm_lButtonDown
seleccionar uwParam
caseof hButton1&
imprimir "Button1 links"
caseof hButton2&
imprimir "Button2 links"
caseof hButton3&
imprimir "Button2 links"
EndSelect
caseof wm_lButtonDblClk
seleccionar uwParam
caseof hButton1&
imprimir "Button1 doppellinks"
caseof hButton2&
imprimir "Button2 doppellinks"
caseof hButton3&
imprimir "Button2 doppellinks"
EndSelect
EndSelect
Wend
nProc someMessagesToUserMessages
parámetros wnd&,msg&,wp&,lp&
var owp&=getWindowLong(wnd&,gwl_userData)
ifnot owp&
setWindowLong(wnd&,gwl_userData,setWindowLong(wnd&,gwl_wndProc,procaddr(someMessagesToUserMessages,4)))
más
caso msg&=WM_RBUTTONDOWN or msg&=wm_rButtonDblClk or msg&=wm_lButtonDown or msg&=wm_lButtonDblClk : sendMessage(%hWnd,msg&,wnd&,lp&)
volver callWindowProc(owp&,wnd&,msg&,wp&,lp&)
endif
volver wnd&
ENDPROC
|
|
|
| |
|
|