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

    Remapping Enter to Tab

    I have a MDI app that uses quite a few modal dialog boxes. Unfortunately pressing return closes the dialog. Is there a way to force make the enter key act as a tab on the dialog(s) of my choosing.

    thanks in advance.
    mitch


  2. #2
    Guest

    Re: Remapping Enter to Tab

    hi!

    U can handle the PreTranslateMessage() funtion in your CDialog derived class. In that function check for WM_KEYDOWN and also check the wParam for the 'Enter' key code. If that is so, do not make a call to CDialog::PreTranslateMessage(). Instead call whatever handler u want to carry out some special handling and then return TRUE from the PreTranslateMessage() function.

    HTH


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