Help finding tab order of dialog control?

Help finding tab order of dialog control?

Post by Bill Whed » Fri, 30 Sep 1994 03:24:38



I have the HWND of a dialog, and the HWND of a control, in this
case a button.  The button is a BorBtn class, and has no text
associated with it for MSTEST to use.  I need to feed MSTEST the
tab order of the button.  How do I get this info from the dialog?
Is there an API call I've missed?
Thanks,

--
======================================================
=                                                    =
=       "Technology goes BOINK!?"  -Hobbes-          =
=                                                    =
======================================================

 
 
 

Help finding tab order of dialog control?

Post by Michael Gea » Sat, 01 Oct 1994 02:43:23



>I have the HWND of a dialog, and the HWND of a control, in this
>case a button.  The button is a BorBtn class, and has no text
>associated with it for MSTEST to use.  I need to feed MSTEST the
>tab order of the button.  How do I get this info from the dialog?
>Is there an API call I've missed?

You can step through all the dialog controls in their tab ordering with:

#include <windowsx.h>

  for( hwndCtl = GetFirstChild( hwndDlg );
       hwndCtl;
       hwndCtl = GetNextSibling( hwndCtl ) )
  {
    // here you get each control in turn, in their Z-order (which is
    // also their tab order)
  }

I'm not sure what information MS Test is looking for, but if it has to do with
tab ordering you should be able to get it from that loop.

-Mike

 
 
 

1. How to control the tab order in dialog with a tab control?

I have a dialog which has a tab control and several other controls -- some
buttons and edit boxes.  A couple of the edit boxes are above the tab
control and a couple are below it.  The problem I have is with the tabbing
order.  When you tab through the controls in the dialog, the focus first
goes through the other controls in the dialog (the ones above and below
the tab control) and then the controls inside the tab control -- even
though the tab control is in the proper position in the dialog template.

I think what's happening is probably because the controls inside the tab
control in a dialog which is a child of the main dialog.  (I believe
that's the recommended way of doing it).  But it's very confusing for the
user for the tab order to work this way.

Is there an easy way of fixing this problem?  I know I could subclass the
appropriate controls in the dialog and handle the tab key myself, but I'd
prefer a more global solution (I have several dialogs like this).

I suspect that using property sheets would solve my problem, but switching
to property sheets isn't really practical for me.

Thanks for any assistance.
- Eric S.

2. (none)

3. How to dynamically set the tab order of dialog controls

4. How to connet Zip drivers on network computers??

5. Getting tab order for a dialog control

6. SMB protocol specification

7. Tab order with a tab control

8. CMYK separation ?

9. tab order problem (dialog with activex inside other dialog)

10. Tab order in dynamic control...help

11. Tab sequence in dialogs with tab controls

12. Ctrl-tab and tab control in a dialog

13. help with tab control on a dialog