John,
There is no explicit definition for tab order in Win32 API. However, tab
order exists only for dialogs.
When TAB or SHIFT + TAB key is pressed first the focused control is sent a
message asking whether the control want to handle the key (key combination)
if the control is not interested GetNextTabItem is used to get HWND to the
next control in the tab order. If a control what to participate in the
'tabbing' it needs to be marked with WS_TABSTOP attribute. The tab order is
specified by the order in which such controls are declared in the dialog box
template (which is the order the controls where created).
To answer your question - you can use GetNextDlgTabItem to discover the
order, but I'm not very sure how to get the first item. The first in the tab
order is the first control to get the focus. The first control to get the
focus is the first control in the dialog box that is visible, not disabled
and has WS_TABSTOP attribute. However that can be changed by the dialog box
itself in response to the WM_INITDIALOG.
--
HTH
Stoitcho Goutsev (100)
"John F" <jf@rt.comwrote in message
news:D3**********************************@microsof t.com...
Hello,
Can anyone tell me what API call I can make to get the tab order of
controls/windows in another unmanaged app? If anyone has any C# sample
code
that would be greatly appreciated.
Thanks,
John