English
Source / code snippets

accepted Edit Enter Erkennt Textver

 

Jörg
Sellmeyer
Edit on one Dialogcontrol accepted "ENTER".
unfortunately becomes then too ESC not any more on the %hwnd durchgereicht
Also a request to recognition of Text Change
CompileMarkSeparation
 $H windows.ph
Def CN(2) If(%message = $0111,((&lparam = &(1)) And (HiWord(&wparam) = &(2))),0)
Def EN_CHANGE(1) CN(&(1),$0300)
Def EnterOn(1) (%key = 13) And (&lparam = &(1))
Cls
Var test& = Control("DIALOG","",$54000000,310,10,200,24,%hwnd,0,%hinstance)
Var Ed& = Create("Edit",test&,"Hier ist der Text",0,0,200,24)
SetFocus(Ed&)
Print "Taste oder Enter drücken"

While 1

    WaitInput
    Locate 2,1

    If %key = 2

        Break

    ElseIf EnterOn(Ed&)

        Print "Enter gedrückt " + GetText$(&lparam)

    ElseIf EN_CHANGE(Ed&)

        Print GetText$(&lparam)

    EndIf

Wend

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/30/11  
 




Jörg
Sellmeyer
so geht's rather. For this must some Keys as Hotkey occupied go.
CompileMarkSeparation
 $H windows.ph
Def CN(2) If(%message = $0111,((&lparam = &(1)) And (HiWord(&wparam) = &(2))),0)
Def EN_CHANGE(1) CN(&(1),$0300)
Def OnEnter(0) MenuItem(13)
Def OnESC(0) MenuItem(27)
Def OnTAB(0) MenuItem(9)

Proc GetNextChild

    Parameters h&
    Var ID% = ItemId(h&)
    Var hNext& = GetHandle(~GetParent(h&),ID% + 1)
    Case hNext& = 0:hNext& = GetHandle(~GetParent(h&),1000)
    Return hNext&

EndProc

Cls
AddHotKey 9,9,0
AddHotKey 13,13,0
AddHotKey 27,27,0
Var Ed& = Create("Edit",%hwnd,"Text 1",400,10,200,24)
Var Ed1& = Create("Edit",%hwnd,"Text 2",400,40,200,24)
Var Ed2& = Create("Edit",%hwnd,"Text 3",400,70,200,24)
Var Ed3& = Create("Edit",%hwnd,"Text 4",400,100,200,24)
Var Ed4& = Create("Edit",%hwnd,"Text 5",400,130,200,24)
Print "Taste oder Enter drücken"

While 1

    WaitInput

    If %key = 2

        Break

    ElseIf OnTAB()

        SetFocus(GetNextChild(%getfocus))
        Print "auf zum Nächsten " + GetText$(GetNextChild(%getfocus))

    ElseIf OnEnter()

        Print "Enter gedrückt " + GetText$(%getfocus)

    ElseIf OnESC()

        Print "Raus aus dem Edit                     "
        SetFocus(%hwnd)

    ElseIf EN_CHANGE(Ed&)

        Print GetText$(&lparam)

    EndIf

/../../Function-References/XProfan/wend/'>Wend

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
10/30/11  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.753 Views

Untitledvor 0 min.
H.Brill08/15/24
RudiB.03/03/24
Thomas Zielinski01/26/23
Frank Reibold11/25/22
More...

Themeninformationen

this Topic has 1 subscriber:

Jörg Sellmeyer (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