English
Forum

Nicos new Waitinput-Thread

 

Nico
Madysa
it was Yes only a question the Time: I have again Ärger with Waitinput.
we take as basis subesquent code:
CompileMarkSeparation
declare dlg& , on% , w%
on% = 0
cls
dlg&  = Create(Window,%hWnd ,Dialog,300,300,300,100)
ShowWindow(dlg&,on%)

whilenot IsKey(27)

    waitinput
    inc w%
    Locate 0 , 0
    print w%

    if IsKey(78)

        if on%

            ShowWindow(dlg&,0)
            on% = 0

        else

            ShowWindow(dlg&,1)
            on% = 1

        endif

        SetFocus(%hWnd) <---SetFocus-Zeile

    endif

wend

end

it never mind other, as the one Dialog-Window on-/disengaged becomes, though in the same Loop How the Mainwindow runs.
this is now very beautiful, one pressing once n, the dialog diving auf; one pressing again n and it disappears again.
If one but the SetFocus-row(s. supra) removes, or to the first n-pressure whom dialog anklickt, is the thing less jolly.
one can the n totdrücken without that the dialog again disappears. and the Variable w% shows Why. After each Waitinput becomes tappt im dunkeln circa 1 increased. in the Dialog-Window happens this not.
its our altes trouble:
the WaitInput reacted not.

Note 1: i want now no APIs How GetASyncKey or so haben; it's located namely definitiv not on the Tastenabfrage, separate on the waitinput.
Note 2: The problem have I do not sought, separate it trod in a größerem Program of me auf; GetMessage can I not use, there then others items in my Program not functions would.
 
Nico Madysa
12/29/06  
 




CompileMarkSeparation
 
12/29/06  
 




Nico
Madysa
thanks, iF! I have me almost virtual, that something like with User Messages goes, but I Have The number the Message in the Profan.hlp not found -_- (instead of I the Header use, but on something like come I naturally not...)
though diving thereby one new Error on.
If one Button whom Focus has, reacted the program at pressure on n not.
instead gives PC a beautiful Klopfton through internem loudspeaker of itself.
so alone is the no real trouble, but dummerweise exists these my complete Mainwindow one (Toolbar-Appearance hold).
would be not one Button deaktiviert been(through EnableWindow) would I well not behind come. because if I on this click, has none More whom Focus, there it it Yes not having must.

P.s.: find I Real nice of you, that You you withal your wicked Erältung around the Problems another kümmerst!
 
Nico Madysa
12/29/06  
 



Yes me GEHTS hundeehlend well the me no see can - but thanks!
 
12/29/06  
 




Nico
Madysa
Mahahaha, wieso Have really always I The whole Problems with Waitinput?
CompileMarkSeparation
declare dlg& , buta& , butb& , on% , w%
on% = 0
cls
buta& = Create(Button,%hWnd,Button 1,0,0,320,240)
butb& = Create(Button,%hWnd,Button 2,320,0,320,240)
EnableWindow butb& , 0
dlg& = Create(Window,%hWnd ,Dialog,300,300,300,100)
ShowWindow(dlg&,on%)

whilenot IsKey(27)

    waitinput
    inc w%
    Locate 0 , 0
    print w%

    if IsKey(78)

        if on%

            ShowWindow(dlg&,0)
            on% = 0

        else

            ShowWindow(dlg&,1)
            on% = 1

        endif

        SetFocus(%hWnd)<---SetFocus-Zeile

    endif

wend

end

roughly derselbe code, How the first, only the now two Buttons the Mainwindow belegen; one normal and a deaktivierter.
once the program launched has, make we the following: we pressing twice on n and, How expects, appear the dialog and disappears again. now clicking we on the first Button, so it whom Focus get and pressing again n and -
nothing happens. has one Button means whom Focus, shining Waitinput wiedermal not To react. clicking we against it on the deaktivierten Button, so verscheindet the Focus, there one deaktiviertes Control Yes none Focus having must, and - tada! - The dialog appear with a pressure on n again.
I have the trouble in my Program first with the row
CompileMarkSeparation
but really pleased be I lest.

has someone The Solution the Problems? is it my guilt or The of XProfan?
I have dummerweise only course the last week so experimentiert and can therefore too only say, that it probably not on the Dialogfensterstil of my Mainwindow lying.
 
Nico Madysa
02/03/07  
 



Have strain one little Time. so?
CompileMarkSeparation
declare dlg& , buta& , butb& , on% , w%
on% = 0
cls
buta& = Create(Button,%hWnd,Button 1,0,0,320,240)
butb& = Create(Button,%hWnd,Button 2,320,0,320,240)
EnableWindow butb& , 0
dlg& = Create(Window,%hWnd ,Dialog,300,300,300,100)
ShowWindow(dlg&,on%)

whilenot IsKey(27)

    WaitInputEx
    inc w%
    Locate 0 , 0
    print w%

    if IsKey(78)

        if on%

            ShowWindow(dlg&,0)
            on% = 0

        else

            ShowWindow(dlg&,1)
            on% = 1

        endif

        SetFocus(%hWnd)<---SetFocus-Zeile

    endif

wend

end

Proc WaitInputEx Erweitertes Waitinput für Dialoge von AH

    Declare AHWait_Counter%
    Clear AHWait_Counter%

    While AHWait_Counter%<25

        inc AHWait_Counter%

    wend

    @External(USER32,MsgWaitForMultipleObjects,0,0,0,-1,$1 | $4 | $10)
    Clear AHWait_Counter%

    While AHWait_Counter%<25

        inc AHWait_Counter%

    wend

../function-references/XProfan/endproc/'>endproc

 
02/03/07  
 



the profanste would it well
CompileMarkSeparation
addhotkey 4001,78,0
>
supra anzufügen and instead of
CompileMarkSeparation
if IsKey(78)re>
simply
CompileMarkSeparation
if (%menuitem=4001)re>
To write.
 
02/03/07  
 




GDL
Do I too same try.Ärgere me with nem RTF zurzeit green and blue.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
02/03/07  
 




Nico
Madysa
thanks for speedy Aids, once I again on the own computer sit will be ichs try.
 
Nico Madysa
02/04/07  
 




Nico
Madysa
Tschuldigung, Have unfortunately forget, To say, that The Hotkey-Variante worked has.
momentarily have I again Ärger with the Waitinput and the XProfan-internen Messageverwaltung.
from designed Found be I now forced, several Controls a Static or for may part of/ one GroupBox directly unterzuordnen. How already desöfteren erwähnt, reacted Profan on Inputs in sochen Enkelfenstern (Kindfenster the Kindfenster) not any more so, How one it gladly had. gives it there a API or a others ploy, circa z.B. The Messages into Mainwindow umzuleiten or something in the manner? The Win32.hlp has me yet no Help give want.

P.s.: It's all right here Specifically for a ReBar-Control (too under the names Docksplitter famous) i want here one ReBar-volume several Controls allocate.
 
Nico Madysa
06/12/07  
 



UserMessages 
 
06/12/07  
 




Uwe
''Pascal''
Niemeier
Hello Nico!

Verwende instead of Groupbox or Static a rahmenlosen dialog, about in this manner:

  
Dlg&=control(Dialog,Dlg1,$50000000,0,0,Breit%,Hoch%,%hwnd,1,0)

has itself by me bewährt, where wide and Höhe with usage in Rebars not time staid go must.

HTH
Pascal
 
06/12/07  
 




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.312 Views

Untitledvor 0 min.
H.Brill05/07/24
Peter Max Müller11/13/17
Joerg04/28/16
Untitled05/16/12

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