• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

Modeless dialog and accelerators

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
roar
Asked:
roar
  • 3
  • 2
1 Solution
 
rajesh032097Commented:
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
 
roarAuthor Commented:
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
 
rajesh032097Commented:
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
 
rajesh032097Commented:
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
 
roarAuthor Commented:
I added a PreTranslateMessage as described in the article, and it worked beatifully. Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now