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?
roarAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
rajesh032097Connect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.