Solved

Accerator keys don't work

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Load and store *.pnm image file 1 86
c++, dynamic object by json 1 45
VS2015 Redefinition errors 4 53
draw a Christmas tree by using a nested loop? 26 63
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

825 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