- Timestamp:
- Dec 18, 1999, 5:31:52 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmframe.cpp
r1971 r2114 1 /* $Id: pmframe.cpp,v 1.2 6 1999-12-05 00:31:47 sandervlExp $ */1 /* $Id: pmframe.cpp,v 1.27 1999-12-18 16:31:49 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 325 325 dprintf(("PMFRAME: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 326 326 327 //Save height so WM_WINDOWPOSCHANGED handler in pmwindow.cpp327 //Save height so WM_WINDOWPOSCHANGED handler in pmwindow.cpp 328 328 //(for client) doesn't overwrite the client rectangle (breaks ydelta calculation) 329 329 clientHeight = win32wnd->getWindowHeight(); 330 330 331 331 RestoreOS2TIB(); … … 385 385 #endif 386 386 387 if(swp[i].y != 0) { 387 if(swp[i].y != 0) //CB: y value of 0 is valid! 388 { 388 389 //child window at offset <> 0 from client area -> offset now changes 389 390 swp[i].y += yDelta; -
trunk/src/user32/user32.cpp
r2093 r2114 1 /* $Id: user32.cpp,v 1.6 0 1999-12-16 16:53:58cbratschi Exp $ */1 /* $Id: user32.cpp,v 1.61 1999-12-18 16:31:49 cbratschi Exp $ */ 2 2 3 3 /* … … 2572 2572 /* CB: move to MDI */ 2573 2573 2574 /*****************************************************************************2575 * Name : WORD WIN32API TileWindows2576 * Purpose : The TileWindows function tiles the specified windows, or the child2577 * windows of the specified parent window.2578 * Parameters: HWND hwndParent handle of parent window2579 * WORD wFlags types of windows not to arrange2580 * LPCRECT lpRect rectangle to arrange windows in2581 * WORD cChildrenb number of windows to arrange2582 * const HWND *ahwndChildren array of window handles2583 * Variables :2584 * Result : If the function succeeds, the return value is the number of2585 * windows arranged.2586 * If the function fails, the return value is zero.2587 * Remark :2588 * Status : UNTESTED STUB2589 *2590 * Author : Patrick Haller [Thu, 1998/02/26 11:55]2591 *****************************************************************************/2592 WORD WIN32API TileWindows(HWND hwndParent,2593 UINT wFlags,2594 const LPRECT lpRect,2595 UINT cChildrenb,2596 const HWND *ahwndChildren)2597 {2598 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",2599 hwndParent,2600 wFlags,2601 lpRect,2602 cChildrenb,2603 ahwndChildren));2604 2605 return (0);2606 }2607 /*****************************************************************************2608 * Name : BOOL WIN32API TileChildWindows2609 * Purpose : Unknown2610 * Parameters: Unknown2611 * Variables :2612 * Result :2613 * Remark :2614 * Status : UNTESTED UNKNOWN STUB2615 *2616 * Author : Patrick Haller [Wed, 1998/06/16 11:55]2617 *****************************************************************************/2618 BOOL WIN32API TileChildWindows(DWORD x1,2619 DWORD x2)2620 {2621 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",2622 x1,2623 x2));2624 2625 return (FALSE); /* default */2626 }2627 /*****************************************************************************2628 * Name : BOOL WIN32API CascadeChildWindows2629 * Purpose : Unknown2630 * Parameters: Unknown2631 * Variables :2632 * Result :2633 * Remark :2634 * Status : UNTESTED UNKNOWN STUB2635 *2636 * Author : Patrick Haller [Wed, 1998/06/16 11:55]2637 *****************************************************************************/2638 BOOL WIN32API CascadeChildWindows(DWORD x1,2639 DWORD x2)2640 {2641 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",2642 x1,2643 x2));2644 2645 return (FALSE); /* default */2646 }2647 2648 2574 /* Drag'n'drop */ 2649 2575 -
trunk/src/user32/win32wbase.cpp
r2099 r2114 1 /* $Id: win32wbase.cpp,v 1.11 3 1999-12-17 17:18:03cbratschi Exp $ */1 /* $Id: win32wbase.cpp,v 1.114 1999-12-18 16:31:50 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2001 2001 point.x = pt.x; 2002 2002 point.y = pt.y; 2003 MapWindowPoints( getParent()->getWindowHandle(),Win32Hwnd,&point,1);2003 MapWindowPoints(Win32Hwnd,getParent()->getWindowHandle(),&point,1); 2004 2004 NotifyParent(Msg,wParam,MAKELPARAM(point.x,point.y)); 2005 2005 } -
trunk/src/user32/win32wmdichild.cpp
r2101 r2114 1 /* $Id: win32wmdichild.cpp,v 1.1 4 1999-12-17 17:49:54cbratschi Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.15 1999-12-18 16:31:51 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 435 435 Win32MDIClientWindow *client = (Win32MDIClientWindow *)getParent(); 436 436 char buffer[128]; 437 UINT n = sprintf(buffer, "%d ", getWindowId() - client->getFirstChildId() + 1); 438 BOOL bRet = 0; 437 UINT id = getWindowId()-client->getFirstChildId()+1; 438 UINT n = sprintf(buffer,(id > 9) ? "%d":"&%d ",id); 439 BOOL bRet = 0; 439 440 440 441 if( !client->getMDIMenu() ) -
trunk/src/user32/win32wmdiclient.cpp
r2099 r2114 1 /* $Id: win32wmdiclient.cpp,v 1.1 5 1999-12-17 17:18:04cbratschi Exp $ */1 /* $Id: win32wmdiclient.cpp,v 1.16 1999-12-18 16:31:51 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 437 437 if( child == getActiveChild() ) 438 438 { 439 ShowWindow(SW_HIDE);439 ::ShowWindow(child->getWindowHandle(),SW_HIDE); 440 440 if( child == getMaximizedChild() ) 441 441 { … … 455 455 if (flagDestroy) 456 456 { 457 // MDI_PostUpdate(GetParent(child), ci,SB_BOTH+1);457 postUpdate(SB_BOTH+1); 458 458 ::DestroyWindow(child->getWindowHandle()); 459 459 } … … 687 687 688 688 /********************************************************************** 689 * 689 * MDI_CalcDefaultChildPos 690 690 * 691 691 * It seems that the default height is about 2/3 of the client rect … … 696 696 RECT rect = *this->getClientRect(); 697 697 INT spacing = GetSystemMetrics(SM_CYCAPTION) + 698 698 GetSystemMetrics(SM_CYFRAME) - 1; 699 699 700 700 if( rect.bottom - rect.top - delta >= spacing ) 701 701 rect.bottom -= delta; 702 702 703 703 nstagger = (rect.bottom - rect.top)/(3 * spacing); … … 1108 1108 } 1109 1109 1110 /***************************************************************************** 1111 * Name : WORD WIN32API CascadeWindows 1112 * Purpose : The CascadeWindows function cascades the specified windows or 1113 * the child windows of the specified parent window. 1114 * Parameters: HWND hwndParent handle of parent window 1115 * UINT wHow types of windows not to arrange 1116 * CONST RECT * lpRect rectangle to arrange windows in 1117 * UINT cKids number of windows to arrange 1118 * const HWND FAR * lpKids array of window handles 1119 * Variables : 1120 * Result : If the function succeeds, the return value is the number of windows arranged. 1121 * If the function fails, the return value is zero. 1122 * Remark : 1123 * Status : UNTESTED STUB 1124 * 1125 * Author : Patrick Haller [Thu, 1998/02/26 11:55] 1126 *****************************************************************************/ 1127 WORD WIN32API CascadeWindows(HWND hwndParent, 1128 UINT wHow, 1129 CONST LPRECT lpRect, 1130 UINT cKids, 1131 const HWND *lpKids) 1132 { 1133 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n", 1134 hwndParent, 1135 wHow, 1136 lpRect, 1137 cKids, 1138 lpKids)); 1139 1140 return (0); 1141 } 1142 1143 /***************************************************************************** 1144 * Name : BOOL WIN32API CascadeChildWindows 1145 * Purpose : Unknown 1146 * Parameters: Unknown 1147 * Variables : 1148 * Result : 1149 * Remark : 1150 * Status : UNTESTED UNKNOWN STUB 1151 * 1152 * Author : Patrick Haller [Wed, 1998/06/16 11:55] 1153 *****************************************************************************/ 1154 BOOL WIN32API CascadeChildWindows(DWORD x1, 1155 DWORD x2) 1156 { 1157 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n", 1158 x1, 1159 x2)); 1160 1161 return (FALSE); /* default */ 1162 } 1163 1164 /***************************************************************************** 1165 * Name : WORD WIN32API TileWindows 1166 * Purpose : The TileWindows function tiles the specified windows, or the child 1167 * windows of the specified parent window. 1168 * Parameters: HWND hwndParent handle of parent window 1169 * WORD wFlags types of windows not to arrange 1170 * LPCRECT lpRect rectangle to arrange windows in 1171 * WORD cChildrenb number of windows to arrange 1172 * const HWND *ahwndChildren array of window handles 1173 * Variables : 1174 * Result : If the function succeeds, the return value is the number of 1175 * windows arranged. 1176 * If the function fails, the return value is zero. 1177 * Remark : 1178 * Status : UNTESTED STUB 1179 * 1180 * Author : Patrick Haller [Thu, 1998/02/26 11:55] 1181 *****************************************************************************/ 1182 WORD WIN32API TileWindows(HWND hwndParent, 1183 UINT wFlags, 1184 const LPRECT lpRect, 1185 UINT cChildrenb, 1186 const HWND *ahwndChildren) 1187 { 1188 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n", 1189 hwndParent, 1190 wFlags, 1191 lpRect, 1192 cChildrenb, 1193 ahwndChildren)); 1194 1195 return (0); 1196 } 1197 1198 /***************************************************************************** 1199 * Name : BOOL WIN32API TileChildWindows 1200 * Purpose : Unknown 1201 * Parameters: Unknown 1202 * Variables : 1203 * Result : 1204 * Remark : 1205 * Status : UNTESTED UNKNOWN STUB 1206 * 1207 * Author : Patrick Haller [Wed, 1998/06/16 11:55] 1208 *****************************************************************************/ 1209 BOOL WIN32API TileChildWindows(DWORD x1, 1210 DWORD x2) 1211 { 1212 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n", 1213 x1, 1214 x2)); 1215 1216 return (FALSE); /* default */ 1217 } 1218 1110 1219 /* -------- Miscellaneous service functions ---------- 1111 1220 * -
trunk/src/user32/win32wnd.cpp
r2084 r2114 1 /* $Id: win32wnd.cpp,v 1. 3 1999-12-16 00:11:48 sandervlExp $ */1 /* $Id: win32wnd.cpp,v 1.4 1999-12-18 16:31:52 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Class for OS/2 … … 33 33 #include "syscolor.h" 34 34 #include "win32wndhandle.h" 35 #include "mdi.h" 36 #include "win32wmdiclient.h" 35 37 36 38 … … 50 52 LRESULT Win32Window::DefFrameProcA(HWND hwndMDIClient, UINT Msg, WPARAM wParam, LPARAM lParam) 51 53 { 52 Win32Window *window = NULL; 54 Win32MDIClientWindow *window = NULL; 55 Win32MDIChildWindow *child; 53 56 54 57 if(hwndMDIClient) 55 window = (Win32 Window*)GetWindowFromHandle(hwndMDIClient);58 window = (Win32MDIClientWindow*)GetWindowFromHandle(hwndMDIClient); 56 59 57 if (window)60 if (window && window->isMDIClient()) 58 61 { 59 62 switch(Msg) … … 64 67 65 68 #if 0 69 case WM_SETTEXT: 70 //CB: infinite loop 71 //window->updateFrameText(MDI_REPAINTFRAME,(LPCSTR)lParam); 72 return 0; 73 #endif 74 66 75 case WM_COMMAND: 67 ci = (MDICLIENTINFO*)wndPtr->wExtra;68 69 76 /* check for possible syscommands for maximized MDI child */ 70 WIN_ReleaseWndPtr(wndPtr); 71 72 if( ci && ( 73 wParam < ci->idFirstChild || 74 wParam >= ci->idFirstChild + ci->nActiveChildren 75 )){ 77 if(wParam < window->getFirstChildId() || wParam >= window->getFirstChildId()+window->getNrOfChildren()) 78 { 76 79 if( (wParam - 0xF000) & 0xF00F ) break; 77 80 switch( wParam ) … … 85 88 case SC_CLOSE: 86 89 case SC_RESTORE: 87 if( ci->hwndChildMaximized )88 return SendMessage16( ci->hwndChildMaximized, WM_SYSCOMMAND,89 wParam,lParam);90 child = window->getMaximizedChild(); 91 if (child) 92 return ::SendMessageA(child->getWindowHandle(),WM_SYSCOMMAND,wParam,lParam); 90 93 } 91 94 } 92 95 else 93 96 { 94 wndPtr = WIN_FindWndPtr(hwndMDIClient); 95 childHwnd = MDI_GetChildByID(wndPtr,wParam ); 96 WIN_ReleaseWndPtr(wndPtr); 97 98 if( childHwnd ) 99 SendMessage16(hwndMDIClient, WM_MDIACTIVATE, 100 (WPARAM16)childHwnd , 0L); 97 child = window->getChildByID(wParam); 98 if (child) 99 ::SendMessageA(window->getWindowHandle(),WM_MDIACTIVATE,(WPARAM)child->getWindowHandle(),0L); 101 100 } 102 101 break; 103 #endif104 102 105 103 case WM_SETFOCUS: -
trunk/src/user32/window.cpp
r2084 r2114 1 /* $Id: window.cpp,v 1.4 2 1999-12-16 00:11:48 sandervlExp $ */1 /* $Id: window.cpp,v 1.43 1999-12-18 16:31:52 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 458 458 if(!window) { 459 459 dprintf(("ShowWindow, window %x not found", hwnd)); 460 460 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 461 461 return 0; 462 462 } … … 1145 1145 pDWP = (DWP *) hdwp; 1146 1146 if (!pDWP) { 1147 1147 dprintf(("**EndDeferWindowPos invalid parameter\n")); 1148 1148 SetLastError(ERROR_INVALID_PARAMETER); 1149 1149 return FALSE; … … 1169 1169 return ChildWindowFromPointEx(hwnd, pt, 0); 1170 1170 } 1171 //******************************************************************************1172 //******************************************************************************1173 1171 /***************************************************************************** 1174 1172 * Name : HWND WIN32API ChildWindowFromPointEx 1175 * Purpose : The GetWindowRect function retrieves the dimensions of the 1176 * bounding rectangle of the specified window. The dimensions are 1177 * given in screen coordinates that are relative to the upper-left 1178 * corner of the screen. 1173 * Purpose : pt: client coordinates 1179 1174 * Parameters: 1180 1175 * Variables : … … 1186 1181 * Author : Rene Pronk [Sun, 1999/08/08 23:30] 1187 1182 *****************************************************************************/ 1188 1189 1183 HWND WIN32API ChildWindowFromPointEx (HWND hwndParent, POINT pt, UINT uFlags) 1190 1184 { 1191 1185 RECT rect; 1192 1186 HWND hWnd; 1193 POINT absolutePt;1187 POINT framePt; 1194 1188 1195 1189 dprintf(("ChildWindowFromPointEx(%08xh,%08xh,%08xh).\n", … … 1202 1196 } 1203 1197 1204 // absolutePt has its top in the upper-left corner of the screen 1205 absolutePt = pt; 1206 ClientToScreen (hwndParent, &absolutePt); 1207 1208 // make rect the size of the parent window 1209 GetWindowRect (hwndParent, &rect); 1210 rect.right = rect.right - rect.left; 1211 rect.bottom = rect.bottom - rect.top; 1212 rect.left = 0; 1213 rect.top = 0; 1214 1215 if (PtInRect (&rect, pt) == 0) { 1198 MapWindowPoints(hwndParent,GetParent(hwndParent),&framePt,1); 1199 if (PtInRect (&rect, framePt) == 0) { 1216 1200 // point is outside window 1217 1201 return NULL; 1218 1202 } 1203 1219 1204 1220 1205 // get first child … … 1238 1223 // is the point in this window's rect? 1239 1224 GetWindowRect (hWnd, &rect); 1240 if (PtInRect (&rect, absolutePt) == FALSE) {1225 if (PtInRect (&rect,pt) == FALSE) { 1241 1226 hWnd = GetWindow (hWnd, GW_HWNDNEXT); 1242 1227 continue; … … 1280 1265 1281 1266 hwndOS2 = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&wPoint); 1282 if(hwndOS2) { 1267 if(hwndOS2) 1268 { 1269 hwnd = Win32BaseWindow::OS2ToWin32Handle(hwndOS2); 1270 if (!hwnd) 1271 { 1272 //CB: could be a frame control 1273 hwndOS2 = OSLibWinQueryWindow(hwndOS2,QWOS_PARENT); 1283 1274 hwnd = Win32BaseWindow::OS2ToWin32Handle(hwndOS2); 1284 if(hwnd) { 1285 dprintf(("WindowFromPoint (%d,%d) %x->%x\n", point.x, point.y, hwndOS2, hwnd)); 1286 return hwnd; 1287 } 1275 } 1276 if(hwnd) { 1277 dprintf(("WindowFromPoint (%d,%d) %x->%x\n", point.x, point.y, hwndOS2, hwnd)); 1278 return hwnd; 1279 } 1288 1280 } 1289 1281 dprintf(("WindowFromPoint (%d,%d) %x->1\n", point.x, point.y, hwndOS2)); … … 1303 1295 } 1304 1296 return window->IsWindowUnicode(); 1305 }1306 /*****************************************************************************1307 * Name : WORD WIN32API CascadeWindows1308 * Purpose : The CascadeWindows function cascades the specified windows or1309 * the child windows of the specified parent window.1310 * Parameters: HWND hwndParent handle of parent window1311 * UINT wHow types of windows not to arrange1312 * CONST RECT * lpRect rectangle to arrange windows in1313 * UINT cKids number of windows to arrange1314 * const HWND FAR * lpKids array of window handles1315 * Variables :1316 * Result : If the function succeeds, the return value is the number of windows arranged.1317 * If the function fails, the return value is zero.1318 * Remark :1319 * Status : UNTESTED STUB1320 *1321 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1322 *****************************************************************************/1323 1324 WORD WIN32API CascadeWindows(HWND hwndParent,1325 UINT wHow,1326 CONST LPRECT lpRect,1327 UINT cKids,1328 const HWND *lpKids)1329 {1330 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",1331 hwndParent,1332 wHow,1333 lpRect,1334 cKids,1335 lpKids));1336 1337 return (0);1338 1297 } 1339 1298 /*********************************************************************** … … 1348 1307 BOOL WIN32API EnumThreadWindows(DWORD dwThreadId, WNDENUMPROC lpfn, LPARAM lParam) 1349 1308 { 1350 return windowDesktop->EnumThreadWindows(dwThreadId, lpfn, lParam); 1309 return windowDesktop->EnumThreadWindows(dwThreadId, lpfn, lParam); 1351 1310 } 1352 1311 //****************************************************************************** … … 1376 1335 BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam) 1377 1336 { 1378 return windowDesktop->EnumWindows(lpfn, lParam); 1337 return windowDesktop->EnumWindows(lpfn, lParam); 1379 1338 } 1380 1339 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.