CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    156

    URGENT : How to catch "Tab" key in dialog

    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




  2. #2
    Join Date
    Apr 1999
    Posts
    43

    Re: URGENT : How to catch "Tab" key in dialog

    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


  3. #3
    Join Date
    May 1999
    Posts
    156

    Re: URGENT : How to catch "Tab" key in dialog

    Thank you very very very much. It works.

    Will


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured