| |
|
|
Stephan Sonneborn | Hello (X)Profan-Friends,
first one herzliches Hello! all XProfan here in the Community! after I into last years hardly to that program come be (Hausumbau), hope I, now again öfters a couple Lines To write.
Since I The 10it XProfan - Version complete missed have, try I, me The new functions the 11it To erschließen.
In one middle-aged proposition I had The thread.pcu of iF verbaut, The me too good services done has. now place I solid, that at Neukompilieren, not any more everything so runs How dwelt. I have first of all CLICKED() in the suspicion had, be but of it again abgerückt: its z.B. rather, each with CONTROL() erstellten Objekt one Own ID To give...
The Thread.pcu has me The Time in the Statuszeile displayed. now read I, that The Thread.pcu with XProfan not unbdingt The best electoral be. can me please times someone on The Sprünge help? Vielen Thanks! |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 11/11/09 ▲ |
|
|
|
|
| unfortunately can The Thread.Pcu in current XProfan-Version not fehlerfrei functions, but the must tappt im dunkeln neither because there's The SubClassProc circa within Waitinput code to execute z.B. by SetTimer-API: [...]
If the obig emulierten Timer not wealthy (what about me my for Statusbaränderung do tappt im dunkeln the ^^), then can too with nativen functions monkey about: [...] with which it then against no procaddr-Problems gives. One Timerbeispiel glue here integrally under dran: [...]
Juhu Stephan is back! |
|
|
| |
|
|
|
Stephan Sonneborn | Hi iF,
thanks for your speedy response. i'll me whom code on the sunday time hither standing! To denne... |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 11/13/09 ▲ |
|
|
|
|
Stephan Sonneborn | Hello David,
so ... integrally understood have I your SetTimer.Prf not. and gewundert, I allegedly everything yet recharge should and then in the XPSE-directory To lying has, hats me too...
therefore in reinem XPROFAN 11: CompileMarkSeparation************************************************************************************************
* SETTIMER DEMO mit CHECKBUTTON *
* Quellcode stammt überwiegend aus der Hilfe zu XPROFAN 11 *
************************************************************************************************
$H Messages.ph
$H Windows.ph
************************************************************************************************
* Funktionen *
************************************************************************************************
Control-ID Generator:
PROC NewID
DECLARE ID&
LastDlgID& = LastDlgID& + 1
ID& = LastDlgID&
RETURN ID&
ENDPROC
Control-Dialogobjekt CHECKBUTTON
DEF CreateXButton(6)CONTROL("BUTTON",@$(2),$54011009,@%(3),@%(4),@%(5),@%(6),@%(1),NewID(), %HInstance, $0000)
************************************************************************************************
* SubClassing *
************************************************************************************************
SubClassProc
IF SubClassMessage(%hWnd, ~wm_sizing)
SetStyle %hwnd, 1, GetStyle(%hwnd, 1) | $02000000
Resize
Set("WinProc", 0)
ElseIf SubClassMessage(bt1&, ~wm_rbuttondown)
SetText bt1&, "Autsch!"
Set("WinProc", 0)
ElseIf SubClassMessage(bt1&, ~wm_rbuttonup)
SetText bt1&, "Test1"
SetMenuItem 3000
Set("WinProc", 0)
ElseIf SubClassMessage(st&, ~wm_mousemove)
SetMenuItem 3001
Set("WinProc", 0)
ElseIf SubClassMessage(%hwnd, ~wm_close)
SetMenuItem 3999
Set("WinProc", 0)
ElseIf SubClassMessage(%hwnd, ~wm_timer)
SetMenuItem 9999
Set("WinProc", 0)
EndIf
ENDPROC
************************************************************************************************
************************************************************************************************
* Fesntergröße einstellen *
************************************************************************************************
Proc Resize
SetWindowPos bt& = 0, 50 - Width(%HWnd)/2, Height(%HWnd) - 75
SetWindowPos bt2& = Width(%HWnd)/2, 50 - Width(%HWnd)/2, Height(%HWnd) - 75
SetWindowPos st& = 0, 0 - 0,0; 0
SetWindowPos tb& = 0, 0 - 0,0; 0
ENDPROC
************************************************************************************************
************************************************************************************************
* Globale Variablen *
************************************************************************************************
DECLARE LastDlgID&
DECLARE bt1&, bt2&, st&, tb&
DECLARE Ende%
************************************************************************************************
* Hauptprpgramm *
************************************************************************************************
Wertzuweisungen
LastDlgID& = 10000 Startwert für Control-ID
Hauptfenster und Dialogobjekte erstellen
CLS
st& = CREATE ("StatusWindow", %HWnd, "Statuszeile")
tb& = CREATE ("Toolbar" , %HWnd, 0, 15, 1, 1000,1)
bt1& = CREATEXBUTTON( %HWnd, "Test1", 0, 50, Width(%HWnd)/2, Height(%HWnd) - 75)
bt2& = CREATE ("Button" , %HWnd, "Test2", Width(%HWnd)/2, 50, Width(%HWnd)/2, Height(%HWnd) - 75)
SubClassing einschalten
SubClass %HWnd, 1 SubClassing des Hauptfensters einschalten
SubClass bt1&, 1 SubClassing des 1. Buttons einschalten
SubClass st&, 1 SubClassing der Statuszeile einschalten
Timer setzen:
SetTimer 500
Hauptschleife
WHILENOT Ende%
WAITINPUT
Ereignisauswertung:
IF %Key = 4
Resize
SetStyle %hwnd, 1, GetStyle(%hwnd, 1) - $02000000
ELSEIF MenuItem(3000)
MessageBox("Rechtsklick auf Button 1!","Test",0)
ELSEIF MenuItem(3001)
MessageBox("Mausbewegung über Statuszeile!","Test",0)
ELSEIF MenuItem(3002)
MessageBox("wm_activate","Test",0)
ELSIF MenuItem(3003)
MessageBox("wm_syscommand",str$(&sWParam),0)
ELSEIF MenuItem(3999)
Case Messagebox("Wollen Sie das Programm wirklich verlassen?","Frage",36) = 6 : Ende% = 1
ELSEIF MenuItem(9999)
SetText st&, TIME$(0) + ":" + LEFT$(TIME$(1),2)
ENDIF
ENDWHILE
SubClassing ausschalten
SubClass %HWnd, 0
SubClass bt1& , 0
SubClass st& , 0
Timer löschen:
KillTimer
href='./../../Function-References/XProfan/programmende/'>End of program
END
a lovely Programmier-sunday all! |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 11/15/09 ▲ |
|
|
|
|
| you have whom reinen Profantext [...] overlooking, To denne.
and gewundert, I allegedly everything yet recharge should and then in the XPSE-directory To lying has, hats me too...
does me sorrow! |
|
|
| |
|
|
|
Stephan Sonneborn |
iF: you have whom reinen Profantext [...] overlooking
Ooops, the Have I well...
does me sorrow!
not bad...
Wozu are The amendment-Proggis because virtual? |
|
|
| Schöne Grüße aus Wittgenstein von Stephan
Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 11/15/09 ▲ |
|
|
|