We help IT Professionals succeed at work.

Keyboard functionality in tabbed dialogs

mikkon
mikkon asked
on
Medium Priority
378 Views
Last Modified: 2013-12-03
I am using TabControl to create a dialog with several tabs. Currently, all my tabs are defined with separate dialog templates and shown/hidden when tabs are changed.

If I use DialogBox(), keyboard functionality does not work. My current solution is to use CreateDialog() and code all the keyboard functionality myself. However, this is quite a task, so I'd like to know if there is an easier way.

Property sheets are out of question. Using CreateDialog() and having IsDialogMessage() in the message loop doesn't work, because IsDialogMessage() apparently doesn't support child dialogs. And I don't want to create a "flat" dialog with all controls in the top-level template, because individual tabs are complex and I want to have separate WndProc()'s for them.
Comment
Watch Question

Commented:
Could you please specify what exactly does not work? Is it Tab key? Shortcuts? Switching tabs by keyboard?

Commented:
Could you please specify what exactly does not work? Is it Tab key? Shortcuts? Switching tabs by keyboard?

Author

Commented:
Tab key, arrow keys, shortcuts, etc. standard dialog functionality. The tab order must go between the parent dialog and its child (the one on the tab control). For example, if I press tab on the last control in the child dialog, focus must move to the parent dialog (the OK button, in this case).

Currently I am not interested in switching tabs by keyboard.

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Excellent! This did exactly what I wanted with minimum work. Thanks very much!

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.