English
Forum

Thread.pcu

 

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!
 
11/11/09  
 




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!
 
11/15/09  
 




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  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.833 Views

Untitledvor 0 min.
Walter05/08/20
AndreasS02/13/19
Peter Max Müller11/26/17
Georg10/19/16
More...

Themeninformationen

this Topic has 2 subscriber:

Stephan Sonneborn (4x)
iF (2x)


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