Solved

EV_WM_KEYDOWN

Posted on 1997-01-22
1
405 Views
Last Modified: 2013-12-04
I am using the Borland C++ 4.5 compiler with ObjectWindows.
I have created a Window with the class TFrameWindow, with
a number if buttons (TButton class) and edit fields (TEdit class). I want to create an event handler that will be
run every time the users presses the escape key. This
event handler should be run even if a button or a edit
field has got the focus. I have tried using an event
handler for the EV_WM_KEYDOWN message for the TFrameWindow, but this seems to be working only when none of the controls have got the focus.
0
Comment
Question by:ruw
1 Comment
 
LVL 2

Accepted Solution

by:
costya earned 100 total points
ID: 1298518
Override the PreprocessMsg function in your window class - it receives input messages before any child windows so you can catch the WM_KEYDOWN there.

Hope this will help.
Costya.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
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…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

16 Experts available now in Live!

Get 1:1 Help Now