English
Forum

SubClassing: Differences in Interpreter and Exe

 
- Page 1 -



E.T.
my the following example reacted in the .exe differently as in the Interpreter:
Interpreter : 
I can with the tab-Button of a Edit to that others hop, without the something happens. come I in Edit 1 on, becomes the Calendar active, leave I this, becomes the Calendar again deaktiviert. I can means in the Edit 1 whom Calendar You can, and the date (which klicked watts), becomes übernommen (means in that SubClassProc run, Menu 15000 staid, the then ausgewertet).
Freu, so will I it having !!

in the Exe 
each time, if the Calendar activate becomes (means Focus in Edit 1) becomes in that SubclassProc run and Menu 15000 staid (means too same on the Start, because Yes the Focus in Edit 1 is).
at that Deaktivieren the Kalenders (Focus ausserhalb Edit 1) becomes again in that SubClassProc run and the Event triggered.
Stoffwechselendprodukt !!

be for each idea grateful !! 
CompileMarkSeparation
Declare Element&[], Kalender&, Ende%

SubClassProc

    If SubClassMessage(Kalender& , 15)Tag angeklickt

        messagebox(Im SubClassProc,Info,64)...zur Information
        SetMenuItem 15000
        Set(WinProc, 1)

    EndIf

EndProc

Proc Check_Element

    If @GetFocus(Element&[1])

        EnableWindow Kalender&,1

    Else

        EnableWindow Kalender&,0

    EndIF

EndProc

Proc Kal_GetDate

    Declare Datum#
    dim Datum#,20
    SendMessage(Kalender&,4097,0,Datum#)
    Var Zurück$ = format$(00,word(Datum#,6))+.+format$(00,word(Datum#,2))+.+format$(0000,word(Datum#,0))
    Dispose Datum#
    Return Zurück$

ENDPROC

Window 800,600
Kalender&=Control(SysMonthCal32,Kalender,$50000000,600,0,180,height(%HWnd),%HWnd,5000,%hinstance,0)
EnableWindow Kalender&,0
Element&[0] = @Control(Dialog,,$54000000 | $00800000,0,0,400,height(%HWnd),%HWnd,5001,%HInstance,$10000)
Element&[1] = @Create(Edit,Element&[0],,10,10,200,20)
Element&[2] = @Create(Edit,Element&[0],,10,50,200,20)
Element&[3] = @Create(Edit,Element&[0],,10,100,200,20)
Element&[4] = @Create(Edit,Element&[0],,10,150,200,20)
SetFocus(Element&[1])
SubClass Kalender&,1

WhileNot Ende%

    Check_Element
    Waitinput

    If %Key = 2

        Ende% = 1

    ElseIf @MenuItem(15000)

        SetText Element&[1],Kal_GetDate()

    EndIf

EndWhile

SubClass Kalender&,0
ass=s4 href='./../../Function-References/XProfan/end/'>end

Nachtrag: Wieso go at all in the Subclassproc The Messages verdreht, the Calendar resolve %Message=32 from, only not Subclassproc ???
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/28/08  
 



 
- Page 1 -



Andreas
Miethe


IDEE !
CompileMarkSeparation
Declare Element&[], Kalender&, Ende%

SubClassProc

    If SubClassMessage(Kalender& , 15) & GetFocus(Element&[1])Tag angeklickt

        SetMenuItem 15000
        Set(WinProc,1)

    EndIf

EndProc

Proc Kal_GetDate

    Declare Datum#
    dim Datum#,20
    SendMessage(Kalender&,4097,0,Datum#)
    Var Zurück$ = format$(00,word(Datum#,6))+.+format$(00,word(Datum#,2))+.+format$(0000,word(Datum#,0))
    Dispose Datum#
    Return Zurück$

ENDPROC

Window 800,600
Kalender&=Control(SysMonthCal32,Kalender,$50000000,600,0,180,height(%HWnd),%HWnd,5000,%hinstance,0)
Element&[0] = @Control(Dialog,,$54000000 | $00800000,0,0,400,height(%HWnd),%HWnd,5001,%HInstance,$10000)
Element&[1] = @Create(Edit,Element&[0],,10,10,200,20)
Element&[2] = @Create(Edit,Element&[0],,10,50,200,20)
Element&[3] = @Create(Edit,Element&[0],,10,100,200,20)
Element&[4] = @Create(Edit,Element&[0],,10,150,200,20)
SetFocus(Element&[1])
SubClass Kalender&,1

WhileNot Ende%

    Waitinput

    If %Key = 2

        Ende% = 1

    ElseIf @MenuItem(15000)

        SetText Element&[1],Kal_GetDate()
        SetFocus(Element&[1])

    EndIf

EndWhile

SubClass Kalender&,0
./../Function-References/XProfan/end/'>end
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
12/28/08  
 




E.T.
@Andreas: thanks. now becomes but the Calendar not any more deaktiviert
by me in the right Proc is the important, there go too yet div. Buttons and Menu-Eintrage disabled.
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/28/08  
 




Sascha
Oliver
Haak
In Your code have I the Focus of Element&[1] taken.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Change
Proc Check_Element
If @GetFocus(Element&[1])
EnableWindow Kalender&,1
Else
EnableWindow Kalender&,0
@SetFocus(Element&[2]) Focus of Element&[1] lane take
EndIF
ENDPROC
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Ende ändern
have too IDEE had.!

If fit Please beautiful!

Greeting
Sascha
 
12/28/08  
 




E.T.
@Sascha: , only says me my Logik, the everything, what behind the Else  standing, anyhow carryed out becomes, if the Focus not on [1] is .
your Loop bewirkt only that I always in [2] ankomme, if I not [1] be. means come I then none More in [3] and [4]...
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/28/08  
 




Sascha
Oliver
Haak
OK have Yes right. (Schnellschuß same Kurzschluß!?!?!)

If first thing in your Hauptroutine first waitinput and then Check_Element manage.
because otherwise The routine Check_Element whom Focus immediate determined.

After Übernahme the Datums has the Edit area none Focus More and sustain this with erneutem
to enter.

rather, by me works it now!

Greeting
Sascha
 
12/28/08  
 




E.T.

Schnellschuß same Kurzschluß!?!?!



the resolve but everything the trouble from my Start-Posting not:
in the Interpreter functions everything, How I it wants, only in the Exe not.
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/28/08  
 




E.T.
WORKARROUND
I Have now in my Prog simply time behind the enable / Deaktivieren the Kalenders one sleep 10 staid, and see there, now working it too in the .exe.
In my obigen Bsp. Have I the whole To sleep 2000 driven, without effect (ggf. still time 10.000 testing). I suspect time, in the Interpreter runs there some vast slower ex, as in the .Exe >>> momentum (dämmer...), somewhere Have there still something red, the in the Interpr. something any 30 Lines gecheckt and is in the .Exe each row...nachschau (but first today noon).

[offtopic]so, now quick yet NEN pail coffee, then wants one TraPo voller mail-Taschen in the Holzäppelgebirge on The Zusteller distributed go (circa these Time mostly with inch-controls joined (conditioned by the sew to CZ, sometimes fahr I directly on the boundary long) >> but one gewöhnt itself on everything, and the Jungens (and sometimes too pretty Mädels) make indeed only Your job). then fix yet ne round sleep...and already can the day on the noon again begin [/offtopic]
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
12/29/08  
 




Frank
Abbing
any 20 Lines.
Hm, one Sleep 10 as Workaround stops I always for untauglich...
 
12/29/08  
 




RGH
E.T.
momentum (dämmer...), somewhere Have there still something red, the in the Interpr. something any 30 Lines gecheckt and is in the .Exe each row...nachschau (but first today noon).


inverse becomes one shoe draus: in the Interpreter becomes (except in the almost-fashion) to eachone Zeil the Messageloop called, in the Runtime to eachone 20. row. your Procedures benefit Messages, means must too this opportunity given go anzukommen. In this case is the Sleep(10) means a korrekte Solution. (In XProfan 11 could instead too the undokumentierte WaitInput 1 akin go.)

Greeting
Roland

Nachtrag: The simplest Solution have I thereby naturally overlooking: One Repaint power here too the, what the name suppose can, there too this commands outside the Fastmode a Messageloop auslöst.
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
12/29/08  
 




Frank
Abbing

your Procedures benefit Messages, means must too this opportunity given go anzukommen. In this case is the Sleep(10) means a korrekte Solution.


SendMessage wait, To The Message too arrived is. Sleep reacted bisweilen unexpected in the Context with Messages, therefore use I in such Make:
CompileMarkSeparation
 
12/29/08  
 




RGH
Frank Abbing

Frank Abbing
your Procedures benefit Messages, means must too this opportunity given go anzukommen. In this case is the Sleep(10) means a korrekte Solution.


SendMessage wait, To The Message too arrived is. Sleep reacted bisweilen unexpected in the Context with Messages, therefore use I in such Make:
CompileMarkSeparation


... what the erwähnten Waitinput 1 corresponds to.

Yes, SendMessage wait, in the Contrast To PostMessage, To The Message arrived is. but some Message resolve to Quittierung further Messages from, The about to that Repaint of Controls Call. and the Waiting then on the next Messageloop.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
12/29/08  
 



 
- Page 2 -



Frank
Abbing

but some Message resolve to Quittierung further Messages from, The about to that Repaint of Controls Call. and the Waiting then on the next Messageloop.


Yes, so viewing naturally logical.


... what the erwähnten Waitinput 1 corresponds to.


Ah, well to know!
 
12/29/08  
 




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

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