Solved

KeyDown

Posted on 1998-05-28
1
181 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

757 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

22 Experts available now in Live!

Get 1:1 Help Now