[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

identifying keystrokes

Posted on 2000-03-12
3
Medium Priority
?
165 Views
Last Modified: 2013-11-20
On my application I have an edit box in which the user enters a string.  I need to be able to tell within the OnChangeEditBox function what the last key the user pressed was, especially whether it was the delete key.

If anyone has any ideas I would be extremely grateful.  Thanks!
0
Comment
Question by:sjhl
[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
3 Comments
 
LVL 5

Accepted Solution

by:
Wyn earned 240 total points
ID: 2609694
You should subclass CEdit and create a new CMyEdit box or subclass the current CEdit control.
Then map WM_KEYUP to your CMyEdit and save the message value into a global or static variable.
Later , in your OnChangeEditFunction(),you'd check the variable to get what key was just released.


Free to ask.

Regards
W.Yinan
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2609697
Btw:You can also store it in PreTranslateMessage(),first check if it's WM_KEYUP and store it.
0
 
LVL 1

Author Comment

by:sjhl
ID: 2609847
Looks a great way to go about it.
However I found an easier method suitable for my application.

thanks
Sjhl.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

656 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