CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    Bangalore
    Posts
    25

    PreTranslateMessage(ALT + TAB key)

    in my PreTranslateMessage function i have the following code to detect if ALT & TAB key r down

    if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_TAB && pMsg->wParam == VK_MENU)
    {
    ...............
    .........
    return -1;
    }

    but this does,nt work for alt key
    what's wrong ???

    in msdn there's VK_ALT but this gives undeclared indetifier
    mamathaks

  2. #2
    Join Date
    Feb 2002
    Posts
    5,757
    One solution is GetKeyState().

    Kuphryn

  3. #3
    Join Date
    Jan 2004
    Location
    Punjab, India
    Posts
    113
    Well, this seem to always evaluate to false....
    Code:
    pMsg->wParam == VK_TAB && pMsg->wParam == VK_MENU
    Amit
    Last edited by Amit Sebiz; June 19th, 2004 at 07:12 AM.

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