Solved

EV_WM_KEYDOWN

Posted on 1997-01-22
1
404 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

13 Experts available now in Live!

Get 1:1 Help Now