Changing the tab order at runtime
Arran Pearson -- Arran@WebAustralia.com.au
Wednesday, March 12, 1997
Environment: MSVC4.1, Winnt 4.0, Win95
Is there a way to change the tab order of control by writing code and is
it possible to do this at runtime? I am trying to make make the
controls on a child form part of the parent windows Tab order, at the
moment I am overriding PreTranslateMessage to do this but there must be
a better way!
Thanks in advance
Arkady Elterman -- arkady@neca.com
Friday, March 14, 1997
[Mini-digest: 3 responses]
Tab order is the same thing as Z-order. Which means that using
SetWindowPos() with appropriate parameters will do the job. There is a Dr.
GUI's article in the MSDN Library about that.
Arkady Elterman
arkady@neca.com
http://www.neca.com/~arkady/spin.htm
----------
: From: Arran Pearson
: To: 'mfc-l@netcom.com'
: Subject: Changing the tab order at runtime
: Date: Tuesday, March 11, 1997 7:23 PM
:
: Environment: MSVC4.1, Winnt 4.0, Win95
:
: Is there a way to change the tab order of control by writing code and is
: it possible to do this at runtime? I am trying to make make the
: controls on a child form part of the parent windows Tab order, at the
: moment I am overriding PreTranslateMessage to do this but there must be
: a better way!
:
: Thanks in advance
-----From: Mike Blaszczak
At 10:23 3/12/97 +1000, you wrote:
>Environment: MSVC4.1, Winnt 4.0, Win95
>Is there a way to change the tab order of control by writing code and is
>it possible to do this at runtime? I am trying to make make the
>controls on a child form part of the parent windows Tab order, at the
>moment I am overriding PreTranslateMessage to do this but there must be
>a better way!
Why must there be?
It turns out there isn't. Windows doesn't directly support bridging
the z-order of a group of windows across parent/child relationships.
You need to force the issue by tossing some logic into
PreTranslateMessage().
>Thanks in advance
Buy me a hockey team. Thanks in advance!
.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.
This performance was not lip-synched.
-----From: "John Bundgaard"
If U set the 'control' style flag for the dialog-template, Windows will
handle tab between controls in the dialog-window, and controls on the
parent.
----------
> From: Arran Pearson
> To: 'mfc-l@netcom.com'
> Subject: Changing the tab order at runtime
> Date: 12. marts 1997 01:23
>
> Environment: MSVC4.1, Winnt 4.0, Win95
>
> Is there a way to change the tab order of control by writing code and is
> it possible to do this at runtime? I am trying to make make the
> controls on a child form part of the parent windows Tab order, at the
> moment I am overriding PreTranslateMessage to do this but there must be
> a better way!
Become an MFC-L member
| Вернуться в корень Архива
|