Tab order in Win32 App
-
In Win32 Application I created dyanmicaly two edit boxes with CreateWindowEx(..) with WS_TABSTOP style. I set the focus to first Edit control in the code. When I run the application two edit boxes are appearing and the focus is set to 1st edit box. When I pressed the tab key the focus not changing to 2nd edit. Can I get any help, and the reason? Thanks in advance. Murali.
-
In Win32 Application I created dyanmicaly two edit boxes with CreateWindowEx(..) with WS_TABSTOP style. I set the focus to first Edit control in the code. When I run the application two edit boxes are appearing and the focus is set to 1st edit box. When I pressed the tab key the focus not changing to 2nd edit. Can I get any help, and the reason? Thanks in advance. Murali.
-
Change the z-order of the created edit box. you can use SetWindowPos() for this.
There is no spoon. mail -
Can you explaine how z-order helps in solving my problem? Can you tell me the signifance of z-order here.
-
In Win32 Application I created dyanmicaly two edit boxes with CreateWindowEx(..) with WS_TABSTOP style. I set the focus to first Edit control in the code. When I run the application two edit boxes are appearing and the focus is set to 1st edit box. When I pressed the tab key the focus not changing to 2nd edit. Can I get any help, and the reason? Thanks in advance. Murali.
Moving focus between controls in a dialog is handled by the Windows dialog manager. If the window containing the controls is not a dialog you will have to handle changing focus yourself in your window procedure. (Assuming this is not an MFC app.) You would have to process WM_CHAR messages and do the appropriate SetFocus when you get TAB. You would also have to check for the Shift key if you had more than two controls.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).