mguyott@mirror.UUCP (Marc Guyott) (01/15/89)
In article <15574@genrad.UUCP> cig@genrad.UUCP (Charles I. Ganimian Jr.) writes: > > Question 2 (for those still reading) > how do I implement a keyboard interface for the grandchild, > the user needs to be able to go from the OK button to a > scrollbar. Do I check WM_KEYDOWN for tabs and do it myself > or is there a way to let windows do it (ala dialog boxes) > I believe that windows will do this for you if you use the IsDialogMessage() routine. The documentation states "Although IsDialogMessage is intended for modeless dialog boxes, it can be used with any window that contains controls to provide the same keyboard selection as a dialog box." I recently attended the Windows programming course offered by Microsoft University (but actually given by INTEL customer support). In our class Paul Yao said that the code for the window proc of a modeless dialog box looked something like this: DialogBox(); EnableWindow(hParent, FALSE); CreateWindow(... DLG_FRAME ...); for (i = 0; i < number_of_controls; i++) CreateWindow(); While(PeekMessage()) { IsDialogMessage(); DispatchMessage(); } From what I remember of what he said in class, you can provide the same keyboard selection as a dialog box if your window has child windows which are controls and if you call the IsDialogMessage() routine in your message loop. I have not yet used this but I will need to use it in the not too distant future so I would be really interested in hearing from anyone who is able to get this type of arrangement to work. I hope this information is useful. Marc ---- "All my life I always wanted to BE somebody. I see now I should have been more specific." Jane Wagner Marc Guyott mguyott@mirror.TMC.COM {mit-eddie, pyramid, harvard!wjh12, xait, datacube}!mirror!mguyott Mirror Systems Cambridge, MA 02140 617/661-0777