Solved

Accerator keys don't work

Posted on 1998-10-18
2
189 Views
Last Modified: 2010-04-02
Any ideas why the acclerator keys (menu shortcuts) in my application don't work?  I'm using VC++ 6 and I've implemented a multidocument/frameview approach.

0
Comment
Question by:dpt081598
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 50 total points
ID: 1175474
1. Do you have a custom message loop ?  If yes if must include TranslateAccelerators stuff.  If using the standard MFC message loop I guess this is okay

2. When you create the doc template you pass a resource id, IDR_MYDOC.  This same id is used for several things.including:

i. the id of a string from the document type parameters (e.g. fill extension etc.)
ii. the id of the menu for template
iii. the id of the accelerator table

The accelerator table should include the short-cut keys to match the text on the menu - and the command-id's.  Have you omitted to add this ?  I think it is probably this, given the little info you have given me to go on.

Post a few more details please if this is no help


0
 

Author Comment

by:dpt081598
ID: 1175475
This was a wierd one.  I was a little misleading by saying the "accelerator keys" didn't work.  Actually, it was just the menu mnemonics that didn't work.  I could click on the mainframe pull down menu, but I couldn't use the menu mnemonics ("alt-f", for example to pull down the "file" menu).  Once I know that the official term is "menu mnemonics," I could search the help properly and found article Q92527, "Accessing Parent Window's Menu from Child Window w/ Focus."

On my formviews in the dialog editor I had checked "system menu."  I didn't need to do this, but because I had it checked, the system menu was intercepting the keystrokes instead of letting them go to the mainframe menu.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

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…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

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

18 Experts available now in Live!

Get 1:1 Help Now