Changeset 2114 for trunk/src/user32/window.cpp
- Timestamp:
- Dec 18, 1999, 5:31:52 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.