Changeset 1671 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Nov 9, 1999, 8:23:17 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r1629 r1671 1 /* $Id: win32wbase.cpp,v 1.7 7 1999-11-08 13:44:15sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.78 1999-11-09 19:23:17 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1036 1036 1037 1037 if(ISMOUSE_CAPTURED()) { 1038 1039 1038 if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_BUTTON, ncx, ncy, msg)) 1039 return 0; 1040 1040 } 1041 1041 … … 1107 1107 } 1108 1108 1109 if(fClick) 1109 if(fClick) 1110 1110 { 1111 1111 HWND hwndTop; 1112 1112 1113 1113 /* Activate the window if needed */ 1114 1115 1116 1117 1118 1119 elsehwndTop = 0;1120 1121 elsehwndTop = (GetTopParent()) ? GetTopParent()->getWindowHandle() : 0;1114 if(isSubclassedOS2Wnd()) { 1115 Win32BaseWindow *parentwnd = GetWindowFromOS2FrameHandle(OSLibWinQueryWindow(OS2Hwnd, QWOS_PARENT)); 1116 if(parentwnd) { 1117 hwndTop = (parentwnd->GetTopParent()) ? parentwnd->GetTopParent()->getWindowHandle() : 0; 1118 } 1119 else hwndTop = 0; 1120 } 1121 else hwndTop = (GetTopParent()) ? GetTopParent()->getWindowHandle() : 0; 1122 1122 1123 1123 if (hwndTop && getWindowHandle() != GetActiveWindow()) … … 1154 1154 1155 1155 if(ISMOUSE_CAPTURED()) { 1156 1157 1156 POINT point = {x,y}; 1157 1158 1158 MapWindowPoints(getWindowHandle(), HWND_DESKTOP, &point, 1); 1159 1160 1159 if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_MOVE, point.x, point.y, keystate)) 1160 return 0; 1161 1161 } 1162 1162 … … 1565 1565 1566 1566 case WM_SYSKEYDOWN: 1567 if(HIWORD(lParam) & KEYDATA_ALT) 1568 { 1569 if(wParam == VK_F4) /* try to close the window */ 1570 { 1571 Win32BaseWindow *window = GetTopParent(); 1572 if(window && !(window->getClass()->getStyle() & CS_NOCLOSE) ) 1573 window->PostMessageA(WM_SYSCOMMAND, SC_CLOSE, 0); 1567 if(wParam == VK_F4) /* try to close the window */ 1568 { 1569 Win32BaseWindow *window = GetTopParent(); 1570 if(window && !(window->getClass()->getStyle() & CS_NOCLOSE)) 1571 window->PostMessageA(WM_SYSCOMMAND, SC_CLOSE, 0); 1572 } 1573 1574 Win32BaseWindow *siblingWindow; 1575 HWND sibling; 1576 char nameBuffer [40], mnemonic; 1577 int nameLength; 1578 1579 GetWindowTextA (nameBuffer, 40); 1580 1581 // search all sibling to see it this key is their mnemonic 1582 sibling = GetWindow (GW_HWNDFIRST); 1583 while (sibling != 0) { 1584 siblingWindow = GetWindowFromHandle (sibling); 1585 nameLength = siblingWindow->GetWindowTextA (nameBuffer, 40); 1586 1587 // find the siblings mnemonic 1588 mnemonic = '\0'; 1589 for (int i=0 ; i<nameLength ; i++) { 1590 if (nameBuffer [i] == '&') { 1591 mnemonic = nameBuffer [i+1]; 1592 if ((mnemonic >= 'a') && (mnemonic <= 'z')) 1593 mnemonic -= 32; // make it uppercase 1594 break; // stop searching 1574 1595 } 1575 } 1596 } 1597 1598 // key matches siblings mnemonic, send mouseclick 1599 if (mnemonic == (char) wParam) { 1600 siblingWindow->SendMessageA (BM_CLICK, 0, 0); 1601 } 1602 1603 sibling = siblingWindow->GetNextWindow (GW_HWNDNEXT); 1604 } 1605 1576 1606 return 0; 1577 1607 … … 2501 2531 { 2502 2532 if(wndname == NULL) 2503 return FALSE; 2533 return FALSE; 2504 2534 2505 2535 if(fUnicode) {
Note:
See TracChangeset
for help on using the changeset viewer.