Click to See Complete Forum and Search --> : URGENT : How to catch "Tab" key in dialog


Will Rothwell
April 12th, 1999, 08:57 AM
Hi,

I have posted this question in beginner but I hear nothing so far. So I try my luck again.

I have a dialog box with 4 CEdit controls for user to enter names and password. I also put a CFileDialog in the dialog template and a static control with ID=stc32. The CFileDialog is initialised in MyDialog::OnInitDialog, for the user to pick directory.

This work fine but I cannot jump from one edit control to the next one when the "tab" key is pressed (as default window editing). When the "tab" key is pressed, the focus just jumps around the CFileDialog's controls only.

I read here that the CFileDialog is the parent of my dialog box. So how can the child controls in the dialog get a chance to receive focus. Can someone help please.

Will

Mike Wild
April 12th, 1999, 09:01 AM
Of course can I help you! It is very important that the child-dialogs or wnds are created with the Styleflag WS_EX_CONTROLPARENT. This should do the trick

Mike

Will Rothwell
April 12th, 1999, 11:38 AM
Thank you very very very much. It works.

Will