Re: Beeping EditText

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi,
here is one way to do it. Basically it says that whenever an enter key is
pressed, tell windows to ignore it.

----------
procedure KeyPress_Sle1(integer self, integer event, sequence parms)
    if parms[1] = VK_RETURN then
        returnValue(0)
    end if
end procedure
setHandler(Sle1, w32HKeyPress, routine_id("KeyPress_Sle1"))
------------

----------------
cheers,
Derek Parnell
----- Original Message -----
From: "Raudaun Long" <LilFreak02_ at hotmail.com>
To: "EUforum" <EUforum at topica.com>
Sent: Sunday, March 02, 2003 5:03 AM
Subject: Beeping EditText


>
> I'm creating a Quake-style console window with an EditText control at
> the bottom of the window and an MLE occupying the rest of the window.
> This window is a child to a frame window, which is used to simulate an
> MDI environment. Typing a command and pressing Enter sends the command
> off to the command parser and interpreter.
>
> However, when you press Enter in the EditText control (single-line)
> Windows beeps (it plays the Default sound in whatever the current
> Windows theme is). In the C++ version of the app I was able to stop this
> by using IsDialogMessage() in the message loop and trapping the
> WM_KEYDOWN message there. I’ve tried this in the Eu version by checking
> for the event with w32HEvent. I’ve also tried trapping the w32HKeyDown
> event for the frame window as well as the console window.
>
> When I changed the EditText control to an MLE control the same size as a
> single line EditText control, the beep went away but carriage-return
> char was always prepended to the next command. I could probably work
> around that quirk as long as it stays consistent but I don’t want to do
> that unless I have to.
>
> The command parser and interpreter work fine, it just gets annoying
> hearing that beep when ever enter is pressed in the command control.
> Anyone have any ideas on how to stop this?
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu