Ignore:
Timestamp:
Jun 3, 2003, 11:51:05 AM (22 years ago)
Author:
sandervl
Message:

Don't search for keyboard accelerators in the default WM_SYSKEYDOWN handler. That's already done in TranslateAccelerator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r10091 r10134  
    1 /* $Id: win32wbase.cpp,v 1.374 2003-05-15 12:40:19 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.375 2003-06-03 09:51:05 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    19711971                if( wParam == VK_ESCAPE && (GetKeyState(VK_SHIFT) & 0x8000))
    19721972                    SendMessageW(getWindowHandle(), WM_SYSCOMMAND, SC_KEYMENU, VK_SPACE );
    1973 
    1974         Win32BaseWindow *siblingWindow;
    1975         HWND sibling;
    1976         char nameBuffer [40], mnemonic;
    1977         int nameLength;
    1978 
    1979         GetWindowTextA (nameBuffer, 40);
    1980 
    1981         // search all sibling to see it this key is their mnemonic
    1982         sibling = GetWindow (GW_HWNDFIRST);
    1983         while (sibling != 0) {
    1984             siblingWindow = GetWindowFromHandle (sibling);
    1985             nameLength = siblingWindow->GetWindowTextA (nameBuffer, 40);
    1986 
    1987             // find the siblings mnemonic
    1988             mnemonic = '\0';
    1989             for (int i=0 ; i<nameLength ; i++) {
    1990                 if (IsDBCSLeadByte(nameBuffer[i])) {
    1991                     // Skip DBCS
    1992                     continue;
    1993                 }
    1994                 if (nameBuffer [i] == '&') {
    1995                     mnemonic = nameBuffer [i+1];
    1996                     if ((mnemonic >= 'a') && (mnemonic <= 'z'))
    1997                         mnemonic -= 32; // make it uppercase
    1998                     break;  // stop searching
    1999                 }
    2000             }
    2001 
    2002             // key matches siblings mnemonic, send mouseclick
    2003             if (mnemonic == (char) wParam) {
    2004                 ::SendMessageA(siblingWindow->getWindowHandle(), BM_CLICK, 0, 0);
    2005             }
    2006             sibling = siblingWindow->GetNextWindow (GW_HWNDNEXT);
    2007             RELEASE_WNDOBJ(siblingWindow);
    2008         }
    2009 
    20101973        return 0;
    20111974    }
     
    41024065    unlock(&critsect);
    41034066    if(i == MAX_OPENDCS) {
     4067        dprintf(("Open DCs:"));
     4068        for(int i=0;i<MAX_OPENDCS;i++) {
     4069            dprintf(("Window %x DC %x", WindowFromDC(hdcWindow[i]), hdcWindow[i]));
     4070        }
    41044071        DebugInt3(); //no room!
    41054072        return;
Note: See TracChangeset for help on using the changeset viewer.