English
Forum

User Messages $10 Runtime Interpreter

 
- Page 1 -



Jörg
Sellmeyer
Nachtrag: with eingebautem WaitInput 5 functions it now How expects.

I must again nerves...

Folgender code power in the interpreter mode very the, I expect and what from the code really obviously his ought to

In compilierter shape die the complete Program but to the Click aufs Cross one Dialoges.
Declare Dlg&[],x%,y%
Window Style %11110
User Messages $10
Cls
Window Title "Hauptfenster " + Str $(%hwnd)
x% = %winleft + 100
y% = %wintop + 120

WhileLoop 0,3

    Inc x% ,30
    Inc y%, 40
    Dlg&[&Loop] = Create("Dialog",%hwnd,"" + Str $(&Loop +1),x%,y%,400,300)
    Settext Dlg&[&Loop],"Test " + Str $(&Loop + 1) + " | " + Str $(Dlg&[&Loop])
    Create("Button",Dlg&[&Loop],"Test",50,50,100,30)

Wend

While 1

    WaitInput
    Case %key = 27:Break' "ESC"

    If %umessage = $10

        If GetFocus(%hwnd)

            Break

        ElseIf ClassOf(GetActiveWindow()) = "#32770"

            WhileLoop 0,SizeOf(Dlg&[]) - 1

                If GetActiveWindow() = Dlg&[&Loop]

                    Print GetText$(Dlg&[&Loop]) + " beendet"
                    Setfocus(%hwnd)
                    DestroyWindow(Dlg&[&Loop])
                    'after I the WaitInput installed have, works it
                    'I erinnererte me, that the compilierte Program The Messageschleife only each x-th time abruft.
                    WaitInput 5
                    Break

                EndIf

            Wend

            Continue

        EndIf

    ElseIf GetText$(%getfocus) = "Test"

        Print "Button",ItemId(%getfocus),"gedrückt"

    EndIf

    Case %Umessage = $10:Print "Das here ought to never To see his!"

Wend

Print "Hauptprogramm beendet"
WaitInput
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/02/18  
 



« this Posting watts as Solution marked. »


Jörg
Sellmeyer
my Version standing in the Signatur. The problem is, that without WaitInput to %umessage = $10, the program terminates, even if only on one Dialog-Window the Closing-Cross betätigt becomes.
Also becomes the Mainwindow not correctly. activate, if one dialog active is, and one then the Cross in the Mainwindow clicking.

I Have it now so resolved, I The request umgestellt Have and gleichzeit at Mainwindow yet on &mwnd chcke. so functions it for me zufriedenstellend.
Declare Dlg&[],x%,y%
Window Style %11110 | 512
User Messages $10
Cls
Window Title "Hauptfenster " + Str $(%hwnd)
x% = %winleft + 100
y% = %wintop + 120

WhileLoop 0,3

    Inc x% ,30
    Inc y%, 40
    Dlg&[&Loop] = Create("Dialog",%hwnd,"" + Str $(&Loop +1),x%,y%,400,300)
    Settext Dlg&[&Loop],"Test " + Str $(&Loop + 1) + " | " + Str $(Dlg&[&Loop])
    Create("Button",Dlg&[&Loop],"Test",50,50,100,30)

Wend

Print "%GetFocus,GetActiveWindow(),%message,&lparam,&wparam"

While 1

    WaitInput
    Case %key = 27:Break' "ESC"

    If %umessage = $10

        If ClassOf(GetActiveWindow()) = "#32770"

            WhileLoop 0,SizeOf(Dlg&[]) - 1

                If GetActiveWindow() = Dlg&[&Loop]

                    Print GetText$(Dlg&[&Loop]) + " beendet"
                    DestroyWindow(Dlg&[&Loop])
                    WaitInput 5
                    Break

                EndIf

            Wend

            Continue

        ElseIf GetFocus(%hwnd) Or (%mwnd = %hwnd)

            Break

        EndIf

    ElseIf GetText$(%getfocus) = "Test"

        Print "Button",ItemId(%getfocus),"gedrückt"

    EndIf

    Case %Umessage = $10:Print "Das here ought to never To see his!"

Wend

Print "Hauptprogramm beendet"
WaitInput
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/03/18  
 




H.Brill
by me functions it compiliert, whether only with WaitInput or
with WaitInput 5. Have it now but only with XProfan X4 probiert.

with which Version have you got probiert ?

PS:
an row understand I do not integrally :

where have you got because The "#32770" since ?

is the a solid dialog-Ressource in the Runtime ?
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
06/03/18  
 




Jörg
Sellmeyer
my Version standing in the Signatur. The problem is, that without WaitInput to %umessage = $10, the program terminates, even if only on one Dialog-Window the Closing-Cross betätigt becomes.
Also becomes the Mainwindow not correctly. activate, if one dialog active is, and one then the Cross in the Mainwindow clicking.

I Have it now so resolved, I The request umgestellt Have and gleichzeit at Mainwindow yet on &mwnd chcke. so functions it for me zufriedenstellend.
Declare Dlg&[],x%,y%
Window Style %11110 | 512
User Messages $10
Cls
Window Title "Hauptfenster " + Str $(%hwnd)
x% = %winleft + 100
y% = %wintop + 120

WhileLoop 0,3

    Inc x% ,30
    Inc y%, 40
    Dlg&[&Loop] = Create("Dialog",%hwnd,"" + Str $(&Loop +1),x%,y%,400,300)
    Settext Dlg&[&Loop],"Test " + Str $(&Loop + 1) + " | " + Str $(Dlg&[&Loop])
    Create("Button",Dlg&[&Loop],"Test",50,50,100,30)

Wend

Print "%GetFocus,GetActiveWindow(),%message,&lparam,&wparam"

While 1

    WaitInput
    Case %key = 27:Break' "ESC"

    If %umessage = $10

        If ClassOf(GetActiveWindow()) = "#32770"

            WhileLoop 0,SizeOf(Dlg&[]) - 1

                If GetActiveWindow() = Dlg&[&Loop]

                    Print GetText$(Dlg&[&Loop]) + " beendet"
                    DestroyWindow(Dlg&[&Loop])
                    WaitInput 5
                    Break

                EndIf

            Wend

            Continue

        ElseIf GetFocus(%hwnd) Or (%mwnd = %hwnd)

            Break

        EndIf

    ElseIf GetText$(%getfocus) = "Test"

        Print "Button",ItemId(%getfocus),"gedrückt"

    EndIf

    Case %Umessage = $10:Print "Das here ought to never To see his!"

Wend

Print "Hauptprogramm beendet"
WaitInput
 
XProfan X3
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/03/18  
 




Michael
W.
@H.Brill

found in  [...] 


The following table describes the system classes that are available only for use by the system. They are listed hier for completeness sake.

ClassDescription
ComboLBoxThe class for the list box contained in a combo box.
DDEMLEventThe class for Dynamic Data Exchange management Library (DDEML) events.
MessageThe class for a message-only window.
#32768The class for a menu.
#32769The class for the desktop window.
#32770The class for a dialog box.
#32771The class for the task switch window.
#32772The class for icon titles.

 
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
06/08/18  
 




H.Brill
thanks for Info.
I thought always, it were only Thread-speed?,
The for itself self talk, about Button, Window etc.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
06/08/18  
 




Michael
W.
find You in the equal item.

its though one Mischmasch, the there zurückgegeben becomes. Getreu the Motto: Why should I there 2 variables benefit, if I everything in a unterbringen can. The users becomes already know, what it there straight allocated has.
 
Alle Sprachen
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
06/08/18  
 




H.Brill
Hello Jörg,
I have over again several Male some ausprobiert.
thereby had to I often whom Taskmanager using,
circa my Program abzuschießen.

How it looks, shining the on the straight active
Window To lying. The following shining so To walk, How
desired :
Declare Dlg&[],x%,y%
User Messages $10
Cls
Window Title "Hauptfenster  terminate with ESC " + Str $(%hwnd)
x% = %winleft + 100
y% = %wintop + 120

WhileLoop 0,3

    Inc x% ,30
    Inc y%, 40
    Dlg&[&Loop] = Create("Dialog",%hwnd,"" + Str $(&Loop +1),x%,y%,400,300)
    Settext Dlg&[&Loop],"Test " + Str $(&Loop + 1) + " | " + Str $(Dlg&[&Loop])
    Create("Button",Dlg&[&Loop],"Test",50,50,100,30)

EndWhile

While 1

    WaitInput
    Case %key = 27 : Break' "ESC"

    If %UMessage = $10

        WhileLoop 0,SizeOf(Dlg&[]) - 1

            If &UWnd = Dlg&[&Loop]

                DestroyWindow(Dlg&[&Loop])
                Print "Dialoghandle : ", Dlg&[&LOOP], " is exits !"

            EndIf

        EndWhile

        SetActiveWindow(%HWnd)

    EndIf

    If GetText$(%getfocus) = "Test"

        Print "Button",ItemId(%getfocus),"gedrückt"

    EndIf

Wend

Print "Hauptprogramm exits !"
WaitInput 2000
DestroyWindow(%HWnd)
End

would be the your imaginations correspond to ?

PS:
usually make I for each dialog a Proc
and behandle whom dialog in a Loop and one
Waitinput. hold so, as Roland too in the Help
writes.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
06/08/18  
 




Jörg
Sellmeyer
with my Program go The dialogs to Laufzeit prepares, without I Einfluss on amount or cover take wants. an Proc per dialog comes means not question. i'll your suggestion test times, be but with my Solution too pleased, there by the nochmalige WaitInput The UserMessage reset and is not any more in the Hauptprogramm ankommt.
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/09/18  
 




Michael
W.
User Messages can with -Nr
too reset and then anew staid go
 
Alle Sprachen
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
06/09/18  
 




Jörg
Sellmeyer
Have I everything ausprobiert, without that it reliably functions has. lying even dran, that The Runtime The Messageschleife seltener pollt, as the Interpreter.
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/09/18  
 




H.Brill
Yes, shining well on XProfans Messagehandling To lying.
with my code supra comes to Closing all dialogs
The wm_close - Message neither More to that Mainwindow.

there should one try, whether one with turn off the internen
Messageverarbeitung with Set("FastMode", 1) and GetMessage
moreover comes. too dialogs are not ideal, there tappt im dunkeln usually
on $10 not automatically react.

there bid XProfan Yes yet More Opportunities.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
06/09/18  
 




H.Brill
so shining it tidy (too as .exe) To walk :
Declare Dlg&[],x%,y%
User Messages $10
Cls
Window Title "Hauptfenster  terminate with ESC " + Str $(%hwnd)
x% = %winleft + 100
y% = %wintop + 120

WhileLoop 0,3

    Inc x% ,30
    Inc y%, 40
    Dlg&[&Loop] = Create("Window",%hwnd,"" + Str $(&Loop +1),x%,y%,400,300)
    Settext Dlg&[&Loop],"Test " + Str $(&Loop + 1) + " | " + Str $(Dlg&[&Loop])
    Create("Button",Dlg&[&Loop],"Test",50,50,100,30)

EndWhile

While 1

    WaitInput
    Case %key = 27 : Break' "ESC"

    If %UMessage = $10

        WhileLoop 0,SizeOf(Dlg&[]) - 1

            If &UWnd = Dlg&[&Loop]

                DestroyWindow(Dlg&[&Loop])
                Print "Dialoghandle : ", Dlg&[&LOOP], " is exits !"
                Break

            EndIf

        EndWhile

        Case &UWnd = %HWnd : Break
        SetActiveWindow(%HWnd)

    EndIf

    If GetText$(%getfocus) = "Test"

        Print "Button",ItemId(%getfocus),"gedrückt"

    EndIf

Wend

Print "Hauptprogramm exits !"
WaitInput 2000
DestroyWindow(%HWnd)
End
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
06/09/18  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.926 Views

Untitledvor 0 min.
Gast.0815 vor 26 Tagen
Stringray01/05/22
Michael Hettner09/02/21
p.specht12/15/20
More...

Themeninformationen



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