Solved

"Delete" key processing

Posted on 1998-07-06
3
190 Views
Last Modified: 2013-12-03
win 95 vis c++ 4.1 MFC application

I am using a formview containing many buttons and an "input" box. i wish to allow the user to delete an "input box" entry using the delete key...and this works automatically...however, the program does not "receive" the fact of the the "delete" key depression., no matter how i try.
How do i set the formview to receive notification of the delete key?
0
Comment
Question by:rich135
[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
3 Comments
 

Expert Comment

by:deedge
ID: 1409512
I'm not sure if I know what you mean by the fact that is works automatically, but then it doesn't work at all.... But, have you tried to receive the WM_KEYUP message. Then check to see if the input box has the focus, and then check to see which key was pressed. If it was the DEL key (have to look it up in the ASCII table) remove the entry?
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 30 total points
ID: 1409513
The WM_CHAR, WM_KEYDOWN, and WM_KEYUP messages are sent to the edit control itself because it has the input focus. If you want to receive the actual keystroke message, you msut subclass the edit control and handle it yourself.

If you want to know that the edit control has changed its content, look for the EN_CHANGE or EN_UPDATE messages, as appropriate. They're sent from the control to the window that owns the control, so you can simply use ClassWizard to hook up handlers for the messages.

B ekiM
0
 

Author Comment

by:rich135
ID: 1409514
good work , mike. The en change did it.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 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