Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Keyboard functionality in tabbed dialogs

Posted on 1998-08-13
5
Medium Priority
?
370 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.
0
Comment
Question by:mikkon
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:Arkadiy
ID: 1413428
Could you please specify what exactly does not work? Is it Tab key? Shortcuts? Switching tabs by keyboard?
0
 
LVL 1

Expert Comment

by:Arkadiy
ID: 1413429
Could you please specify what exactly does not work? Is it Tab key? Shortcuts? Switching tabs by keyboard?
0
 
LVL 1

Author Comment

by:mikkon
ID: 1413430
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.

0
 
LVL 1

Accepted Solution

by:
Arkadiy earned 400 total points
ID: 1413431
The first thing to do is to specify DS_CONTROL style in the template of the child dialog. Here is the documentation:

DS_CONTROL
                             Creates a dialog box that works well as a
                             child window of another dialog box,
                             much like a page in a property sheet.
                             This style allows the user to tab among
                             the control windows of a child dialog
                             box, use its accelerator keys, and so on.

If that flag does not help, reject the answer and we will start over :)
0
 
LVL 1

Author Comment

by:mikkon
ID: 1413432
Excellent! This did exactly what I wanted with minimum work. Thanks very much!

0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Screencast - Getting to Know the Pipeline

886 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