Changeset 6783 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Sep 22, 2001, 8:21:01 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r6773 r6783 1 /* $Id: win32wbase.cpp,v 1.28 3 2001-09-20 12:57:15sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.284 2001-09-22 18:21:00 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 78 78 //For quick lookup of current process id 79 79 static ULONG currentProcessId = -1; 80 static int iF10Key = 0; 81 static int iMenuSysKey = 0; 80 82 81 83 //****************************************************************************** … … 994 996 else SendInternalMessageA(WM_ACTIVATEAPP, 0, threadidhwnd); //deactivate; specify thread id of other process 995 997 return rc; 998 } 999 //****************************************************************************** 1000 //****************************************************************************** 1001 ULONG Win32BaseWindow::MsgChildActivate(BOOL fActivate) 1002 { 1003 //SvL: Don't send WM_(NC)ACTIVATE messages when the window is being destroyed 1004 if(fDestroyWindowCalled) { 1005 return 0; 1006 } 1007 1008 //According to SDK docs, if app returns FALSE & window is being deactivated, 1009 //default processing is cancelled 1010 //TODO: According to Wine we should proceed anyway if window is sysmodal 1011 if(SendInternalMessageA(WM_NCACTIVATE, fActivate, 0) == FALSE && !fActivate) 1012 { 1013 dprintf(("WARNING: WM_NCACTIVATE return code = FALSE -> cancel processing")); 1014 return 0; 1015 } 1016 /* child windows get a WM_CHILDACTIVATE message */ 1017 if((getStyle() & (WS_CHILD | WS_POPUP)) == WS_CHILD ) 1018 { 1019 if(fActivate) {//WM_CHILDACTIVE is for activation only 1020 SendInternalMessageA(WM_CHILDACTIVATE, 0, 0L); 1021 } 1022 return 0; 1023 } 1024 DebugInt3(); 1025 return 0; 996 1026 } 997 1027 //****************************************************************************** … … 1733 1763 1734 1764 case WM_SYSKEYDOWN: 1735 if(wParam == VK_F4) /* try to close the window */ 1736 { 1737 Win32BaseWindow *window = GetWindowFromHandle(GetTopParent()); 1738 if(window && !(window->getClass()->getStyle() & CS_NOCLOSE)) 1739 PostMessageA(window->getWindowHandle(), WM_SYSCOMMAND, SC_CLOSE, 0); 1740 if(window) RELEASE_WNDOBJ(window); 1741 return 0; 1742 } 1765 { 1766 if( HIWORD(lParam) & KEYDATA_ALT ) 1767 { 1768 /* if( HIWORD(lParam) & ~KEYDATA_PREVSTATE ) */ 1769 if( wParam == VK_MENU && !iMenuSysKey ) 1770 iMenuSysKey = 1; 1771 else 1772 iMenuSysKey = 0; 1773 1774 iF10Key = 0; 1775 1776 if( wParam == VK_F4 ) /* try to close the window */ 1777 { 1778 HWND top = GetTopWindow(); 1779 if (!(GetClassLongW( top, GCL_STYLE ) & CS_NOCLOSE)) 1780 PostMessageW( top, WM_SYSCOMMAND, SC_CLOSE, 0 ); 1781 } 1782 } 1783 else if( wParam == VK_F10 ) 1784 iF10Key = 1; 1785 else 1786 if( wParam == VK_ESCAPE && (GetKeyState(VK_SHIFT) & 0x8000)) 1787 SendMessageW(WM_SYSCOMMAND, SC_KEYMENU, VK_SPACE ); 1743 1788 1744 1789 Win32BaseWindow *siblingWindow; … … 1779 1824 1780 1825 return 0; 1781 1782 #if 0 //CB: todo: MSDN docu: Windown handles these messages and not WM_SYSCHAR (the code below doesn't work) 1783 case WM_KEYDOWN: 1826 } 1827 1784 1828 case WM_KEYUP: 1785 case WM_SYSKEYDOWN:1786 1829 case WM_SYSKEYUP: 1787 #endif 1830 /* Press and release F10 or ALT */ 1831 if (((wParam == VK_MENU) && iMenuSysKey) || 1832 ((wParam == VK_F10) && iF10Key)) 1833 ::SendMessageW( GetTopWindow(), WM_SYSCOMMAND, SC_KEYMENU, 0L ); 1834 iMenuSysKey = iF10Key = 0; 1835 break; 1788 1836 1789 1837 case WM_SYSCHAR: 1790 1838 { 1791 i nt iMenuSysKey = 0;1839 iMenuSysKey = 0; 1792 1840 if (wParam == VK_RETURN && (getStyle() & WS_MINIMIZE)) 1793 1841 { … … 1801 1849 break; 1802 1850 if (wParam == VK_SPACE && (getStyle() & WS_CHILD)) { 1803 getParent()->SendMessageA(Msg, wParam, lParam );1851 ::SendMessageW(GetParent(), Msg, wParam, lParam ); 1804 1852 } 1805 1853 else SendMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)(DWORD)wParam );
Note:
See TracChangeset
for help on using the changeset viewer.