CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Dialog based

  1. #1
    Guest

    Dialog based

    hai ,

    How do i trap the characters of the keyboard in a dialog based application.

    I had tried WM-CHAR,WM_KEYDOWN,WM_KEYUP,WM_KEYPRESS,PreTransalateMessage

    Its not working. Please help me


    satish




  2. #2
    Guest

    Re: Dialog based

    Normally PreTranslateMessage works well

    Try this :

    BOOL CTestDlg::PreTranslateMessage(MSG* pMsg)
    {
    if ( pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)
    {
    // To have information about key see WM_KEYDOWN message in help files
    // Note that pMsg->wParam contains the virtual key code
    }

    return CDialog::PreTranslateMessage(pMsg);
    }



  3. #3
    Guest

    Re: Dialog based

    thanks Anonymous

    Its working after i do the filtering part.

    satish


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