how to set tab stop order programmatically
-
How can I change the tab stop order for the controls in a dialog after the dialog is displayed? Thanks in advance.
-
How can I change the tab stop order for the controls in a dialog after the dialog is displayed? Thanks in advance.
You can't, unless you're building the dialog template dynamically. The tab order of the controls is determined by their order in the dialog template. You can see this by editing the .rc file, and shuffling the controls around. Creating the template dynamically is a lot of work. Why do you want to change the tab order? Best wishes, Hans
-
You can't, unless you're building the dialog template dynamically. The tab order of the controls is determined by their order in the dialog template. You can see this by editing the .rc file, and shuffling the controls around. Creating the template dynamically is a lot of work. Why do you want to change the tab order? Best wishes, Hans
Thank you for replying so fast. actually, I want to insert an own control into the dialog. I create this control in OnCreate. I hope the user can use "tab" to go through all the controls. for example, there are two buttons in the dialog, call A and B. now I create an own control, I hope to set its tab stop order between A and B. Then when user presses "tab", the focus will go to A, own control, B, and go back to A. Thanks again.
-
How can I change the tab stop order for the controls in a dialog after the dialog is displayed? Thanks in advance.
You would use CWnd::SetWindowPos() for each of the controls you wanted to alter.