Changing tab order of dynamically created child windows 
Author Message
 Changing tab order of dynamically created child windows

I have a dialog box that has several controls placed on it at design time.

I create a checklist box at run-time, and it always gets placed last in the
tab order (even though it's the second control that the user sees).

Is there a way to dynamically reorder the tab sequence in a dialog box?  

Scott Nelson



Mon, 05 Jun 2000 03:00:00 GMT  
 Changing tab order of dynamically created child windows

I've not done it myself, but I remember an answer to a similar posting in
the past was that you use SetWindowPos, and that changing the tab order of
controls is similar to changing the ZOrder of windows.



Quote:
> I have a dialog box that has several controls placed on it at design
time.

> I create a checklist box at run-time, and it always gets placed last in
the
> tab order (even though it's the second control that the user sees).

> Is there a way to dynamically reorder the tab sequence in a dialog box?  

> Scott Nelson



Mon, 05 Jun 2000 03:00:00 GMT  
 Changing tab order of dynamically created child windows

you could handle the OnSetFocus message and explicitly set the focus to
whatever control you want to.

i came across  a Dlgtpl32 sample from microsoft which demonstrates how to
create dialog templates in memory. this had some code to change the tab
order at run time. this could be useful if you can find it.

good luck

Quote:

>I have a dialog box that has several controls placed on it at design time.

>I create a checklist box at run-time, and it always gets placed last in the
>tab order (even though it's the second control that the user sees).

>Is there a way to dynamically reorder the tab sequence in a dialog box?

>Scott Nelson



Mon, 05 Jun 2000 03:00:00 GMT  
 Changing tab order of dynamically created child windows

Quote:
>Is there a way to dynamically reorder the tab sequence in a dialog box?  

Scott,

The tab sequence order is determined by the Z-order of the child
windows (controls). You can use SetWindowPos to alter the z-order.

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Tue, 06 Jun 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to dynamically change tab order?

2. Main Window with dynamically-created child windows containing controls

3. Child window tab order

4. Set Z-order on dynamically created windows

5. How to create a MDI child window dynamically?

6. Dynamically adjusting tab order

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

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

9. Changing tab order in a CPropertySheet

10. Changing Dialog Controls' Tab Order at Runtime

11. howto change tab order at runtime?

12. Change MDI child caption and Close child window button

 

 
Powered by phpBB® Forum Software