473,507 Members | 6,727 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tab Order

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
Sep 6 '06 #1
2 4278
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

Sep 6 '06 #2
Thank you!
--
John F
"Stoitcho Goutsev (100)" wrote:
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


Sep 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3638
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
9
2720
by: Steven T. Hatton | last post by:
The following works: template <typename T> struct ID3M{ static const T ID; }; template <typename T> const T ID3M<T>::ID = {{1,0,0},{0,1,0},{0,0,1}};
15
4292
by: | last post by:
The data file is a simple Unicode file with lines of text. BCP apparently doesn't guarantee this ordering, and neither does the import tool. I want to be able to load the data either sequentially...
27
11120
by: Abdullah Kauchali | last post by:
Hi folks, Can one rely on the order of keys inserted into an associative Javascript array? For example: var o = new Object(); o = "Adam"; o = "Eve";
8
6797
by: kaosyeti | last post by:
i have a (hopefully) small problem. i have created a system where a user enters customer information into a table through a form. this table has no primary key. there are 9 fields on the form to...
104
10757
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through...
13
4412
by: bevanward | last post by:
Hi All I am finding unexpected results when inserted into a newly created table that has a field of datatype int identity (1,1). Basically the order I sort on when inserting into the table is...
3
3972
by: Hartmut Dippon | last post by:
Hi all, I hope somebody can help me with following problem: I have an application where I can drag&drop files/dirs from within explorer onto my form. If multiple files/dirs are selected I...
54
3867
by: Rasjid | last post by:
Hello, I have just joined and this is my first post. I have never been able to resolve the issue of order of evaluation in C/C++ and the related issue of precedence of operators, use of...
25
2802
by: DanicaDear | last post by:
Hello again Bytes...I missed you! First, background: In a hotstick lab, we ship orders every two years. We ship a new order and the customer uses the new box to return the previous year's order....
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3190
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.