Solved

Enter Key press on an Edit Control

Posted on 1998-08-25
2
423 Views
Last Modified: 2013-11-19
Is there a way in MFC to trap the enter key press on an edit control ?
0
Comment
Question by:psapra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 1321274
In the Resource Editor do two things:

Select the Edit Control in question and select it's properties:

1) Set it to be multi-line
2) Choose "Want Return"

Now it will trap the RETURN key.
0
 

Author Comment

by:psapra
ID: 1321275
What message handler gets invoked by pressing the RETURN key on the edit box ? Is it one of those that shows up in ClassWizard for an edit control or is it a separate one that I have to use ? Please let me know.

Thanks.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question