Solved

Accerator keys don't work

Posted on 1998-10-18
2
199 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

932 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

10 Experts available now in Live!

Get 1:1 Help Now