English
Forum

%Key will not return staid?

 

Nico
Madysa
i'm already with XProfan9 one Error noticed, whom I here now time show wants.
starting point is this Minimalcode.
CompileMarkSeparation
declare but& , dlg& , e%
WindowStyle 26
Window 100 , 100 - 200 , 200
cls External("User32","GetSysColor",15)
but& = Create("Button",%hWnd,"Dialog",5,5,100,25)

whilenot %Key = 2

    waitinput

    if Clicked(but&)

        dlg& = Create("Dialog",%hWnd,"DER Dialog",5,5,100,300)
        clear e%

        whilenot e%

            waitinput

            if %Key = 2

                inc e%

            endif

        wend

        DestroyWindow(dlg&)

    endif

wend

end

If one over the Button whom dialog opens and this subsequently over the [X] becomes the Mainwindow too closed. and the though
1.) the Mainwindow none Dialog-Window-Style has.
2.) %Key to the read still reset go should.

has someone ne Solution?
 
Nico Madysa
06/26/06  
 



Probier time the dulcoiF .
CompileMarkSeparation
 
06/26/06  
 




Sebastian
König
Hi,

in my eyes is the really no Error, because The outer Loop is Yes as

Whilenot %Key = 2

definiert. After the Click the X in the dialog is %key = 2 given and the Loop becomes leave. this lying on it, that %key not at Reading reset becomes, separate only by a WaitInput/-Key/-Scan or GetMessage-commands.

an simple Solution would, too for outer Loop a end%-Variable To using and these z.B. with case %key = 2: end% = 1 to the WaitInput in the äußeren Loop to settle.

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
06/26/06  
 




Nico
Madysa
with the Hilfsvariablen have ichs already probeirt, works not, there %Key at Reading even not reset becomes.
But if I your first testimony correctly. understood have, würde´
CompileMarkSeparation
Whilenot %Key = 2

    If Clicked(But&)

        Dlg& = Create("Dialog",%Hwnd,"DER Dialog",5,5,100,300)
        Clear E%

        Whilenot E%

            Waitinput

            If %Key = 2

                Inc E%

            Endif

        Wend

        Destroywindow(Dlg&)

    Endif

    Waitinput

Wend

End

klappen, there the Waitinput the first Loop end is and %Key therefore to which request yet new tuned go would.
thanks for Help.

@iF: I versteh this Dulcoif not, what should the because mean?
 
Nico Madysa
06/27/06  
 




Michael
Wodrich
[quote:0a67fc8c6a]@iF: I versteh this Dulcoif not, what should the because mean?[/quote:0a67fc8c6a]
For this ought to one The Search bemühen and itself whom whole Thread durchlesen.

the DulcoIf ought to verabreicht to be the kränkelnden Message-Handling on The Sprünge To help...

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
06/27/06  
 




Sebastian
König
[quote:e7e4a282c6]But if I your first testimony correctly. understood have, würde´ [...]
klappen, there the Waitinput the first Loop end is and %Key therefore to which request yet new tuned go would.[/quote:e7e4a282c6] this is not integrally, I meant, but it functions objectively . the WaitInput _nach_ the internal Loop setting %key back and only then again on 2, if the X in the Mainwindow klicked becomes.

so integrally beautiful find I with the the WaitInput end the Loop though not... probably goes it into most Make well, but I would it on whom beginning settle, so one not possibly in irgendeinem undefinierten status launch and Perhaps activities without input carryed out go (could in a komplizierteren Loop Yes thoroughly his, think I).

here times the Variante with 2 self-contained end-variables, on The I virtual having:
CompileMarkSeparation
Declare But& , Dlg& , E1%, E2%
Windowstyle 26+512
Window 100 , 100 - 200 , 200
Cls External("User32","GetSysColor",15)
But& = Create("Button",%Hwnd,"Dialog",5,5,100,25)

Whilenot E1%

    Waitinput
    case %key = 2 : E1% = 1 war fälschlicherweise erst E1% = 0

    If Clicked(But&)

        Dlg& = Create("Dialog",%Hwnd,"DER Dialog",5,5,100,300)
        Clear E2%

        Whilenot E2%

            Waitinput

            If %Key = 2

                Inc E2%

            Endif

        Wend

        Destroywindow(Dlg&)

    Endif

Wend

End

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
06/27/06  
 




Nico
Madysa
there's, faith I, one small Error:
what happens, if I the Mainwindow(with dialog-Style) close wants, without The dialog-Box aufzurufen? there becomes E1% Yes on 0 staid, runs means moreover. because of the undefiniertem status with one nachgestellten Waitinput:
one could too a Repeat-Until-Loop as Hauptschleife nehmen;
or one power to the Hauptschleife NOCH one Waitinput, then should The thing klappen.
 
Nico Madysa
06/28/06  
 




Sebastian
König
[quote:7a4701bab3]there's, faith I, one small Error:
what happens, if I the Mainwindow(with dialog-Style) close wants, without The dialog-Box aufzurufen? there becomes E1% Yes on 0 staid, runs means moreover. (...)[/quote:7a4701bab3]
Ups - sorry!! I had with the äußeren Loop falschrum virtual, means on While E1% ...
correctly. would naturally: Case %Key = 2 : E1% = 1 - I change the in the code supra same time

now should but everything aale his - have it anyway straight successful tested - too with Style 512...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
06/28/06  
 




Nico
Madysa
OK, thanks for Help!
 
Nico Madysa
06/29/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

878 Views

Untitledvor 0 min.
Georg01/16/21
H.Brill02/09/19
ByteAttack11/01/15
holmol9306/13/13

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