:-) How To Stop The Tab Key From Moving To Next Control in Tab Order if Some Ciiteria is Not Met 
Author Message
 :-) How To Stop The Tab Key From Moving To Next Control in Tab Order if Some Ciiteria is Not Met

:-) How To Stop The Tab Key From Moving To Next Control in Tab Order if Some
Ciiteria is Not Met. I Do Not Want To Write on KillFocus & SetFocus Because
Handler of GotFocus Of The Second Control will also Be Called.

Thanks



Fri, 03 Dec 2004 08:54:36 GMT  
 :-) How To Stop The Tab Key From Moving To Next Control in Tab Order if Some Ciiteria is Not Met
You should be able to handle this in PreTranslateMessage of your dialog.
Call the base class only when the key is hit along with your criteria etc.

--
Ajay Kalra [MVP - VC++]


Quote:
> :-) How To Stop The Tab Key From Moving To Next Control in Tab Order if
Some
> Ciiteria is Not Met. I Do Not Want To Write on KillFocus & SetFocus
Because
> Handler of GotFocus Of The Second Control will also Be Called.

> Thanks



Fri, 03 Dec 2004 10:05:55 GMT  
 :-) How To Stop The Tab Key From Moving To Next Control in Tab Order if Some Ciiteria is Not Met

Quote:
>:-) How To Stop The Tab Key From Moving To Next Control in Tab Order if Some
>Ciiteria is Not Met.

I'm not sure, but try handling WM_GETDLGCODE and returning
DLGC_WANTTAB.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Fri, 03 Dec 2004 12:20:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to move focus to next tab stop?

2. Moving the first tab in a tab control over a bit

3. Cannot press tab to move to a tab control after using WS_EX_CONTROLPARENT

4. Tab control and tab order

5. Tab key to tab between controls does not work properly

6. Tab Control Ctrl-Tab-Keys

7. Tab stop order

8. Colon moves line to tab stop

9. How to stop Alt+Tab and/or the Windows Key

10. tab key not tabbing in my dialog

11. Trapping ENTER key to move to next control

12. auto tab to next edit control

 

 
Powered by phpBB® Forum Software