Get Notified of ENTER in single line EDIT control

This is a discussion on Get Notified of ENTER in single line EDIT control within the Windows Programming forums, part of the Platform Specific Boards category; How do you find out when in a standard windows single line EDIT control Enter has been pressed. I am ...

  1. #1
    Morpheus
    Guest

    Get Notified of ENTER in single line EDIT control

    How do you find out when in a standard windows single line EDIT control Enter has been pressed.
    I am writing a little terminal program that uses an edit control for the user to enter commands and then when he presses enter I want to use WM_GETTEXT in the parent's window PROC. I know this would be much simpler in a dialog box because the edit control can press the dialogs default button when it receives the enter key but my app uses a window I have created and not a dialog.
    thanx in advance

  2. #2
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Post I think this is how

    I have done this before. You have to give the EDIT its own WndProc, and catch the WM_KEYDOWN message. I think it's called sub-classing.
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help again with scrolling without wrapping
    By Dukefrukem in forum C Programming
    Replies: 8
    Last Post: 09-21-2007, 01:48 PM
  2. Buttons + Edit Control
    By jay kay in forum Windows Programming
    Replies: 6
    Last Post: 03-09-2005, 05:36 PM
  3. How can I send a text string to an edit control
    By marc74 in forum Windows Programming
    Replies: 5
    Last Post: 01-06-2005, 10:14 PM
  4. Could somebody please help me with this C program
    By brett73 in forum C Programming
    Replies: 6
    Last Post: 11-25-2004, 02:19 AM
  5. Rich edit control example Win API
    By Echidna in forum Windows Programming
    Replies: 1
    Last Post: 09-17-2001, 03:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21