Solved

KeyDown

Posted on 1998-05-28
1
198 Views
Last Modified: 2010-04-10
I have created a modeless dialog box which is "in focus" when my application starts.  I need to detect the F1 key, but it is not tied to any menu selection or dialog control.  I have tried OnKeyDown, but that function does not seem to get called when I press the F1 key (or any other key).  Is there a trick to OnKeyDown?  How do you detect key presses when dialog boxes are displayed?
0
Comment
Question by:jerm
1 Comment
 
LVL 3

Accepted Solution

by:
tma050898 earned 10 total points
ID: 1164895
You can override the PreTranslateMessage.

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

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