Changeset 9345 for trunk/src/user32
- Timestamp:
- Oct 15, 2002, 11:18:12 AM (23 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/menu.cpp
r8872 r9345 1 /* $Id: menu.cpp,v 1. 49 2002-07-15 10:16:28sandervl Exp $*/1 /* $Id: menu.cpp,v 1.50 2002-10-15 09:18:09 sandervl Exp $*/ 2 2 /* 3 3 * Menu functions … … 2889 2889 #ifdef __WIN32OS2__ 2890 2890 //double click on system menu -> close application 2891 PostMessageA(hwnd, WM_SYSCOMMAND,SC_CLOSE, msg.lParam); 2891 if (!(GetClassLongA(hwnd, GCL_STYLE) & CS_NOCLOSE)) 2892 PostMessageA(hwnd, WM_SYSCOMMAND, SC_CLOSE, msg.lParam); 2892 2893 #endif 2893 2894 fEndMenu = TRUE; -
trunk/src/user32/oslibwin.cpp
r9256 r9345 1 /* $Id: oslibwin.cpp,v 1.12 8 2002-09-17 10:24:02sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.129 2002-10-15 09:18:10 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 103 103 if(fOS2Look && *hwndFrame) { 104 104 FCData.flCreateFlags = dwOSFrameStyle; 105 // FCData.flCreateFlags = FCF_TITLEBAR|FCF_SYSMENU|FCF_MINMAX;106 105 WinCreateFrameControls(*hwndFrame, &FCData, NULL); 107 106 } … … 156 155 //****************************************************************************** 157 156 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, 158 DWORD dwExStyle, HICON hSysMenuIcon )157 DWORD dwExStyle, HICON hSysMenuIcon, BOOL drawCloseButton) 159 158 { 160 159 SWP swp[3]; … … 186 185 i++; 187 186 } 187 188 188 } 189 189 else … … 209 209 swp[i].cx -= minmaxwidth/2; 210 210 } 211 //there is no close button in warp 3 212 if((dwStyle & WS_SYSMENU_W) && !fVersionWarp3) { 211 //there is no close button in warp 3 and sometimes we do not 212 //have close button as well 213 if((dwStyle & WS_SYSMENU_W) && !fVersionWarp3 && drawCloseButton) { 213 214 swp[i].cx -= minmaxwidth/2; 214 215 } … … 238 239 swp[i].cx += minmaxwidth/2; 239 240 } 240 //there is no close button in warp 3 241 if((dwStyle & WS_SYSMENU_W) && !fVersionWarp3) { 241 //there is no close button in warp 3 and sometimes we do not have 242 //close button as well 243 if((dwStyle & WS_SYSMENU_W) && !fVersionWarp3 && drawCloseButton) { 242 244 swp[i].cx += minmaxwidth/2; 243 245 } … … 975 977 // the first entry returned is always the window list itself 976 978 if (WinQuerySwitchList(0, &swblk, sizeof(SWBLOCK)) > 0) 977 WinSetActiveWindow(HWND_DESKTOP, swblk.aswentry[0].swctl.hwnd); 979 WinSetActiveWindow(HWND_DESKTOP, swblk.aswentry[0].swctl.hwnd); 980 // WinShowWindow(swblk.aswentry[0].swctl.hwnd, TRUE); 978 981 } 979 982 //****************************************************************************** … … 1082 1085 if (WinQueryActiveWindow(HWND_DESKTOP) == hwndFrame) 1083 1086 WinSendMsg(WinWindowFromID(hwndFrame, FID_TITLEBAR), TBM_SETHILITE, (MPARAM)1, 0); 1087 1084 1088 } 1085 1089 } // os2look 1090 } 1091 1092 //****************************************************************************** 1093 //****************************************************************************** 1094 BOOL OSLibChangeCloseButtonState(HWND hwndFrame, BOOL State) 1095 { 1096 return WinEnableMenuItem(WinWindowFromID(hwndFrame, FID_SYSMENU), SC_CLOSE, State); 1086 1097 } 1087 1098 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r9230 r9345 1 /* $Id: oslibwin.h,v 1.6 8 2002-09-12 09:30:06sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.69 2002-10-15 09:18:10 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 48 48 DWORD OSLibQueryWindowStyle(HWND hwnd); 49 49 50 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, DWORD dwExStyle, HICON hSysMenuIcon); 50 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, DWORD dwExStyle, HICON hSysMenuIcon, BOOL drawCloseButton); 51 BOOL OSLibChangeCloseButtonState(HWND hwndFrame, BOOL State); 51 52 52 53 #define OSLIB_QWL_USER -4 -
trunk/src/user32/win32wbase.cpp
r9342 r9345 1 /* $Id: win32wbase.cpp,v 1.34 1 2002-10-11 14:58:36sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.342 2002-10-15 09:18:10 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1360 1360 { 1361 1361 RECT rect = {0}; 1362 BOOL fCloseButton; 1363 1364 fCloseButton = !(windowClass && (windowClass->getClassLongA(GCL_STYLE) & CS_NOCLOSE)); 1365 1362 1366 int height = getWindowHeight(); 1363 1367 RECTLOS2 rectOS2; … … 1373 1377 rectOS2.yBottom = height - rect.top; 1374 1378 rectOS2.yTop = height - rect.bottom; 1375 OSLibWinPositionFrameControls(getOS2FrameWindowHandle(), &rectOS2, dwStyle, dwExStyle, IconForWindow(ICON_SMALL)); 1379 1380 //@@PF Disable close button as well when needed by application 1381 OSLibChangeCloseButtonState(getOS2FrameWindowHandle(), fCloseButton); 1382 OSLibWinPositionFrameControls(getOS2FrameWindowHandle(), &rectOS2, 1383 dwStyle, dwExStyle, IconForWindow(ICON_SMALL), 1384 fCloseButton); 1376 1385 } 1377 1386 return rc; -
trunk/src/user32/win32wbasenonclient.cpp
r9008 r9345 1 /* $Id: win32wbasenonclient.cpp,v 1.4 3 2002-08-15 15:45:46sandervl Exp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.44 2002-10-15 09:18:12 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 1240 1240 1241 1241 case HTSYSMENU: 1242 if (!(GetClass Word(Win32Hwnd,GCW_STYLE) & CS_NOCLOSE))1242 if (!(GetClassLongA(getWindowHandle(),GCL_STYLE) & CS_NOCLOSE)) 1243 1243 SendMessageA(getWindowHandle(), WM_SYSCOMMAND,SC_CLOSE,lParam); 1244 1244 break;
Note:
See TracChangeset
for help on using the changeset viewer.