Solved

"Delete" key processing

Posted on 1998-07-06
3
184 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now