Solved

Keyboard functionality in tabbed dialogs

Posted on 1998-08-13
5
357 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 100 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 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