English
Forum

Edit enter beep coloured readonly

 

Ernst
Hello experts!
The Inputs in the Edit should for further processing with <Enter> completed go (analog How with Input; it but should even not a Own Input-Dialogbox his).
the inquire the Enter-Button is no trouble, but how can I the störenden Beep unterbinden?
I Have already geraume Time gegooglet, but without something verwertbares to find.
has someone a profane- or api-Solution ?
Regards serious
 
04/12/16  
 




RudiB.
whatever for a Beep...
habs time tested....
here example from the Forum...
 $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 is the Text",0,0,200,24)
SetFocus(Ed&)
Print "Taste or Enter drücken"

While 1

    WaitInput
    Locate 2,1

    If %key = 2

        Break

    ElseIf EnterOn(Ed&)

        Print "Enter pressed " + GetText$(&lparam)

    ElseIf EN_CHANGE(Ed&)

        Print GetText$(&lparam)

    EndIf

Wend

 
FreeProfan
Xprofan X4
Rudolf Beske / München

Hardware: NB Intel I9 - 16GByte RAM
04/12/16  
 




Ernst
Vielen Dank; whom Code Jörg I had already time seen, was but now apparently not able it again zufinden

with obigem code have I now the Edit with colour hinterlegt, however with read-only is the colour lane (grauer background) - likewise without colour ( weißer background) becomes on gray staid.
 $H windows.ph
 $H messages.ph
Def CN(2) If(%message = ~WM_COMMAND,((&lparam = &(1)) And (hiword(&wparam) = &(2))),0)
Def EN_CHANGE(1) CN(&(1),~EN_CHANGE)
Def EnterOn(1) (%key = 13) And (&lparam = &(1))
Declare OCP&,Brush&
' -------------------------------------------------------------------------------------

Proc ControlProc

    parameters Wnd&, Msg&, wParam&, lParam&

    IF Brush&

        ~DeleteObject(Brush&)

    Endif

    If msg&=~WM_CTLCOLOREDIT or msg&=~WM_CTLCOLORSTATIC

        Brush& = ~CreateSolidBrush(RGB(255,255,170))
        ~SetBkMode(wParam&, ~TRANSPARENT)
        Return Brush&

    Endif

    Return ~CallWindowProc(OCP&,Wnd&, Msg&, WParam&, LParam&)

Endproc

' -------------------------------------------------------------------------------------
CLS
Var test& = Control("DIALOG","",$54000000,310,10,200,24,%hwnd,0,%hinstance)
Var Ed& = Create("Edit",test&,"Hier is the Text",0,0,200,24)
OCP& = ~SetWindowLong(test&,~GWL_WNDPROC, ProcAddr(ControlProc,4))
SetFocus(Ed&)
SendMessage(ed&,$CF,1,0)' read only
Print "Taste or Enter drücken"

While 1

    WaitInput
    Locate 2,1

    If %key = 2

        Break

    ElseIf EnterOn(Ed&)

        Print "Enter pressed " + GetText$(&lparam)

    ElseIf EN_CHANGE(Ed&)

        Print GetText$(&lparam)

    EndIf

EndWhile

IF Brush&

    ~DeleteObject(Brush&)

Endif

End

there now irgendeine Possibility, the Edit on read-only To settle, where but the Backgroundcolor receive remaining ?

Regards and Thanks in the Vorhinein

hab's already gefunden; if the Edit read-only is, sends not ~WM_CTLCOLOREDIT separate ~WM_CTLCOLORSTATIC.
in the code (supra) eingefügt and funkt. - JUHU
 
04/13/16  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.702 Views

Untitledvor 0 min.
H.Brill08/15/24
Walter05/12/23
RudiB.12/29/21
Torben Nissen04/26/20
More...

Themeninformationen

this Topic has 2 subscriber:

Ernst (2x)
RudiB. (1x)


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