Forum | | | | | on(Event) (Download)
The Unit (Sourcecode is beiliegend!), allows (without Fastmode and Prozeduradressen!) the Abprüfen of Doppelklicks or rights-Mouse button-activities on Dialogelementen and Controls How Listboxes, Buttons... too the Repaint of Dialogen is now one children's play.
Schade the Thomas its easyVent not rebuild can - means have I time attempts its dll on minimaler Base nachzustellen with the entscheidenen point the it without Procaddr functions! and it functions wonderful!
example: CompileMarkSeparation {$cleq}
$U on.pcu = on.
Def GetSysColor(1) !"User32","GetSysColor"
declare lb&,dlg&
//unsichtbares Hauptfenster damit lecker messages angekommen
windowstyle 80 | 1024
window 0,0 - 0,0
showwindow(%hwnd,0)
//
windowstyle 512+8
dlg&:=createdialog(0,"MyDlg",100,100,640,480)
lb&:=createbutton(dlg&,"",10,30,100,100)
on.event "paint" ,dlg& ,12343
on.event "close" ,dlg& ,12344
on.event "ldklick" ,lb& ,12345
on.event "rklick" ,lb& ,12346
on.event "mouseover" ,lb& ,12347
on.event "mouseleave" ,lb& ,12348
PaintDlg 0
while 1
waitinput
case %umessage==12343 : paintDlg 0
case %umessage==12344 : break
case %umessage==12345 : settext dlg&,"dblklick "+str$(&gettickcount)
case %umessage==12346 : settext dlg&,"rklick "+str$(&gettickcount)
case %umessage==12347 : settext lb&,"Hau ab!"
case %umessage==12348 : settext lb&,""
wend
on.delevent "paint" ,dlg& ,12343
on.delevent "close" ,dlg& ,12344
on.delevent "ldklick" ,lb& ,12345
on.delevent "rklick" ,lb& ,12346
on.delevent "mouseover" ,lb& ,12347
on.delevent "mouseleave",lb& ,12348
on.close
end
Proc PaintDlg
parameters u&
startpaint dlg&
usefont "MS Sans Serif",10,0,0,0,u&
textcolor $00FF0000,-1
drawtext 10,300,"https://ich.hab-doch-garkeine-homepage.de"
endpaint
=s4 href='./../../Function-References/XProfan/endproc/'>endproc
|
| | | | |
| | | so - new version uploaded - the Remove of Events goes now too because the last Parameter of/ one Eventangabe 0 (zero) is.
Event settle:
On(MessageNummer ,ControlHandle,UserMessage,HauptfensterHWND)
Event delete:
On(MessageNummer ,ControlHandle,UserMessage,0)
it can several Events per Control staid go!
The most important Konstanten this should his: CompileMarkSeparation |
| | | | |
| | | so in all my Tests - no Error.
I mean The DLL can now of you tested go.
its accordingly now imaginable simply Doppelklicks or Rechtemaustasten on Controls How Buttons or Listboxes fehlerfrei abzufangen. its no Fastmode, and no WProc necessary! The DLL GetControlParas (B suitable Messages in User Messages circa. |
| | | | |
| | | time look Perhaps can I the whole yet More vereinfachen... |
| | | | |
| | | Wow wm_close in order to Verify on whom dialog the [X] pressed watts-Test: CompileMarkSeparationDeclare Lb&,Dll&,Lb2&,Lb3&
Def On(4) !"on.dll","on"
Dll&:=Usedll("on.dll")
Cls
Lb&:=Create("Button",%Hwnd,"",10,50,100,100)
Lb2&:=Createdialog(%hwnd,"",10,10,200,200)("Button",%Hwnd,"",210,50,100,100)
Lb&:=Createdialog(%hwnd,"",310,310,200,200)("Button",%Hwnd,"",210,50,100,100)
Lb3&:=Create("ListBox",%Hwnd,"",110,50,100,100)
// on EVENT auf HANDLE putmessage MESSAGE an FENSTER
On(515 , Lb&,102425,%Hwnd)/*~WM_LBUTTONDBLCLK*/
On(16 , lb2&,102426,%Hwnd)/*~WM_LBUTTONDBLCLK*/
On(515 , Lb3&,102427,%Hwnd)/*~WM_LBUTTONDBLCLK*/
whileloop 10:addstring(lb&,str$(&loop)):wend
Usermessages 102425,102426,102427
While 1
Waitinput
Settext %Hwnd,Str$(&Gettickcount)
If %Umessage==102425
Print "jaul!"
Elseif %Umessage==102426
Print "ooar!"
Elseif %Umessage==102427
Print "ach"
Endif
Wend
End
|
| | | | |
| | | Repaint on Dialogen? Juhu no trouble! and everything without WProc and fastmode CompileMarkSeparationXPSE-Quelltext erkannt. Precompiler XPSE für Ausführung benötigt.
Declare Lb&,Dll&
Def On(4) !"on.dll","on"
Dll&:=Usedll("on.dll")
Cls
Lb&:=Createdialog(%hwnd,"",310,310,200,200)("Button",%Hwnd,"",210,50,100,100)
On(15,lb&,102425,%Hwnd)
On(16,lb&,102426,%Hwnd)
Usermessages 102425,102426
drw
While 1
Waitinput
Settext %Hwnd,Str$(&Gettickcount)
If %Umessage==102425
drw
elseif %umessage=102426
on(15,lb&,102425,0)
on(16,lb&,102426,0)
destroywindow(lb&)
Endif
Wend
End
proc drw
startpaint lb&
drawtext 10,10,"lalala"
endpaint
endproc
|
| | | | |
| | Jac de Lad | I habs not yet testing can, but ifs functions is the the i-Tüpfelchen for XProfan!
Jac |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 09/14/06 ▲ |
| |
| | Jac de Lad | which Version is now The richtigeß If I on whom Link integrally supra click comes a almost 600kB-File, under in the Posting (where x time gedownloaded standing) comes only a 9kB-File...slight verwirrend. |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 09/14/06 ▲ |
| |
| | | Both is the same! The a isn't 600kb big! I mean Your browser spin, but wait I Have here same yet what better! |
| | | | |
| | | so! look you time whom obigen Download on - and the example! now ists really dead easy and one should itself with the Unit (source lying thereby) not even More around the DLL concern! CompileMarkSeparation {$cleq}
$U on.pcu = on.
Def GetSysColor(1) !"User32","GetSysColor"
declare lb&,dlg&
//unsichtbares Hauptfenster damit lecker messages angekommen
windowstyle 80 | 1024
window 0,0 - 0,0
showwindow(%hwnd,0)
//
windowstyle 512+8
dlg&:=createdialog(0,"MyDlg",100,100,640,480)
lb&:=createbutton(dlg&,"",10,30,100,100)
on.event "paint" ,dlg& ,12343
on.event "close" ,dlg& ,12344
on.event "ldklick" ,lb& ,12345
on.event "rklick" ,lb& ,12346
on.event "mouseover" ,lb& ,12347
on.event "mouseleave" ,lb& ,12348
PaintDlg 0
while 1
waitinput
case %umessage==12343 : paintDlg 0
case %umessage==12344 : break
case %umessage==12345 : settext dlg&,"dblklick "+str$(&gettickcount)
case %umessage==12346 : settext dlg&,"rklick "+str$(&gettickcount)
case %umessage==12347 : settext lb&,"Hau ab!"
case %umessage==12348 : settext lb&,""
wend
on.delevent "paint" ,dlg& ,12343
on.delevent "close" ,dlg& ,12344
on.delevent "ldklick" ,lb& ,12345
on.delevent "rklick" ,lb& ,12346
on.delevent "mouseover" ,lb& ,12347
on.delevent "mouseleave",lb& ,12348
on.close
end
Proc PaintDlg
parameters u&
startpaint dlg&
usefont "MS Sans Serif",10,0,0,0,u&
textcolor $00FF0000,-1
drawtext 10,300,"https://ich.hab-doch-garkeine-homepage.de"
endpaint
=s4 href='./../../Function-References/XProfan/endproc/'>endproc
|
| | | | |
| | Jac de Lad | thanks, I probiers today same from!
Jac |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 09/14/06 ▲ |
| |
| | Jac de Lad | same The first question: gives it a or several reaches of User Messages, everybody can not define ought to (should I in example as message not 1 take, Why too always)?
Jac |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 09/14/06 ▲ |
| |
|
AnswerThemeninformationenthis Topic has 3 subscriber: |