Solved

EV_WM_KEYDOWN

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MSDN Subscription - Azure and NFP's 3 75
Issue when running a SSIS package (.dts) from an SQL job 21 83
SSRS troubles 4 68
Input parameteres to DragOver 2 19
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…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

839 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