Solved

Modeless dialog and accelerators

Posted on 1997-04-23
5
297 Views
Last Modified: 2013-11-20
I've got some modeless dialogs inside a CFormView (like a CPropertyPage/Sheet). The accelerators don't work when focus is on one of the dialogs.
Any idea how I can make them work?
0
Comment
Question by:roar
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
rajesh032097 earned 70 total points
ID: 1301164
Hi,
Try the following:
Set the "control" property for each of your dialog which you are using inside the CFormView. This property is available in the "More Styles" tab of the dialog properties in the VC++ dialog editor.
0
 

Author Comment

by:roar
ID: 1301165
I really expected that to work, given the description of the control property in the online help. I applied the control property to the dialogs, but unfortunately I still got the same problem. If you made it work, can you give me some details on what you did?
0
 
LVL 2

Expert Comment

by:rajesh032097
ID: 1301166
Can you elaborate on how exactly you are using the form view? I had the same problem and got solved by setting the "control" property. One more thing which also worked with me is setting "control parent" property in "extended styles" tab. But if your dialogs are derived from CPropertyPage, then this won't work since Property pages donot yet support dialog templates with extended styles.  
Hope this works.
0
 
LVL 2

Expert Comment

by:rajesh032097
ID: 1301167
Hi again,
Please also refer to "using accelerators in modeless dialogs" article in MFC knowledge base.
If you have any problems with it, get back to me.
0
 

Author Comment

by:roar
ID: 1301168
I added a PreTranslateMessage as described in the article, and it worked beatifully. Thanks.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

747 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

13 Experts available now in Live!

Get 1:1 Help Now