?
Solved

Accerator keys don't work

Posted on 1998-10-18
2
Medium Priority
?
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 150 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 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.
Suggested Courses

800 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