English
Forum

first Experience...

 
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

 
09/13/06  
 



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
WM_LBUTTONDBLCLK = { $203 | 515 }
WM_LBUTTONDOWN = { $201 | 513 }
WM_LBUTTONUP = { $202 | 514 }
WM_MBUTTONDBLCLK = { $209 | 521 }
WM_MBUTTONDOWN = { $207 | 519 }
WM_MBUTTONUP = { $208 | 520 }
WM_RBUTTONDBLCLK = { $206 | 518 }
WM_RBUTTONDOWN = { $204 | 516 }
WM_RBUTTONUP = { $205 | 517 }
WM_MOUSEMOVE = { $200 | 512 nt>
 
09/14/06  
 



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.
 
09/14/06  
 



time look Perhaps can I the whole yet More vereinfachen...
 
09/14/06  
 



Wow wm_close in order to Verify on whom dialog the [X] pressed watts-Test:
CompileMarkSeparation
Declare 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
 
09/14/06  
 



Repaint on Dialogen? Juhu no trouble! and everything without WProc and fastmode
CompileMarkSeparation
XPSE-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

 
09/14/06  
 




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!
 
09/14/06  
 



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

 
09/14/06  
 




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  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.452 Views

Untitledvor 0 min.
Peter Max Müller05/13/15
Ernst05/17/14
H.Brill04/09/14
Ingobingo10105/03/12
More...

Themeninformationen

this Topic has 3 subscriber:

iF (12x)
Jac de Lad (6x)
Rolf Koch (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