Solved

EV_WM_KEYDOWN

Posted on 1997-01-22
1
407 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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 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…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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…

770 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