Capturing RETURN key in CEdit control on CFormView

Posted on 1999-06-29
Medium Priority
Last Modified: 2013-11-20
I have a CEdit control on a CFormView. I want to capture when the return key is pressed after entering something in the edit control and then call a function to process the information in tghe edit control. How do I get the program to recognize when the RETURN key is pressed? I've tried implementing OnChar() but that does nothing.
Question by:duffer2
LVL 23

Accepted Solution

chensu earned 100 total points
ID: 1308402
Use the same technique in the following KB article. OnChar should also work.

How to Trap Arrow Keys in an Edit Control of a Dialog Box

Expert Comment

ID: 1308403
Try with PreTranslateMessage Virtual Function.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…

627 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