- Timestamp:
- Oct 17, 1999, 5:46:10 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r1333 r1336 1 /* $Id: dc.cpp,v 1.1 4 1999-10-17 12:17:42 cbratschiExp $ */1 /* $Id: dc.cpp,v 1.15 1999-10-17 15:46:07 sandervl Exp $ */ 2 2 3 3 /* … … 1006 1006 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 1007 1007 1008 dprintf (("User32: UpdateWindow hwnd %x -> wnd %x", hwnd, wnd));1008 dprintf (("User32: UpdateWindow hwnd %x -> wnd %x", hwnd, wnd)); 1009 1009 1010 1010 if (WinQueryUpdateRect (wnd->getOS2WindowHandle(), NULL)) -
trunk/src/user32/pmwindow.cpp
r1333 r1336 1 /* $Id: pmwindow.cpp,v 1.3 3 1999-10-17 12:17:44 cbratschiExp $ */1 /* $Id: pmwindow.cpp,v 1.34 1999-10-17 15:46:08 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 325 325 } 326 326 point.y = OSLibQueryScreenHeight() - point.y - swpFrame.cy; 327 327 328 win32wnd->setWindowRect(point.x, point.y, point.x+swpFrame.cx, point.y+swpFrame.cy); 328 329 win32wnd->setClientRect(pswpo->x, pswpo->y, pswpo->x + pswpo->cx, pswpo->y + pswpo->cy); -
trunk/src/user32/user32.cpp
r1299 r1336 1 /* $Id: user32.cpp,v 1.4 2 1999-10-14 19:31:31sandervl Exp $ */1 /* $Id: user32.cpp,v 1.43 1999-10-17 15:46:08 sandervl Exp $ */ 2 2 3 3 /* … … 1373 1373 SHORT WIN32API GetKeyState( int nVirtKey) 1374 1374 { 1375 #ifdef DEBUG 1376 WriteLog("USER32: GetKeyState %d\n", nVirtKey); 1375 //SvL: Hehe. 32 MB logfile for Opera after a minute. 1376 #ifdef DEBUG 1377 // WriteLog("USER32: GetKeyState %d\n", nVirtKey); 1377 1378 #endif 1378 1379 return O32_GetKeyState(nVirtKey); … … 1870 1871 //****************************************************************************** 1871 1872 //****************************************************************************** 1872 BOOL WIN32API EndDeferWindowPos( HDWP hWinPosInfo)1873 {1874 #ifdef DEBUG1875 WriteLog("USER32: EndDeferWindowPos\n");1876 #endif1877 return O32_EndDeferWindowPos(hWinPosInfo);1878 }1879 //******************************************************************************1880 //******************************************************************************1881 HWND WIN32API FindWindowW( LPCWSTR lpClassName, LPCWSTR lpWindowName)1882 {1883 char *astring1 = UnicodeToAsciiString((LPWSTR)lpClassName);1884 char *astring2 = UnicodeToAsciiString((LPWSTR)lpWindowName);1885 HWND rc;1886 1887 #ifdef DEBUG1888 WriteLog("USER32: FindWindowW\n");1889 #endif1890 rc = O32_FindWindow(astring1, astring2);1891 FreeAsciiString(astring1);1892 FreeAsciiString(astring2);1893 return rc;1894 }1895 //******************************************************************************1896 //******************************************************************************1897 1873 HWND WIN32API GetForegroundWindow(void) 1898 1874 { … … 1938 1914 //****************************************************************************** 1939 1915 //****************************************************************************** 1940 #if 01941 int WIN32API GetUpdateRgn( HWND hWnd, HRGN hRgn, BOOL bErase)1942 {1943 #ifdef DEBUG1944 WriteLog("USER32: GetUpdateRgn\n");1945 #endif1946 hWnd = Win32Window::Win32ToOS2Handle(hWnd);1947 1948 return O32_GetUpdateRgn(hWnd,hRgn,bErase);1949 }1950 #endif1951 1916 /***************************************************************************** 1952 1917 * Name : int WIN32API GetWindowRgn … … 2288 2253 BOOL WIN32API ScreenToClient (HWND hwnd, LPPOINT pt) 2289 2254 { 2290 #ifdef DEBUG2291 WriteLog("USER32: ScreenToClient\n");2292 #endif2293 2255 Win32BaseWindow *wnd; 2294 2256 PRECT rcl; 2257 2258 dprintf(("ScreenToClient %x (%d,%d)\n", hwnd, pt->x, pt->y)); 2295 2259 2296 2260 if (!hwnd) return (TRUE); … … 2302 2266 OSLibWinMapWindowPoints (OSLIB_HWND_DESKTOP, wnd->getOS2WindowHandle(), (OSLIBPOINT *)pt, 1); 2303 2267 pt->y = (rcl->bottom - rcl->top) - pt->y; 2268 dprintf(("ScreenToClient %x returned (%d,%d)\n", hwnd, pt->x, pt->y)); 2304 2269 return (TRUE); 2305 2270 } 2306 2271 2307 /* Scroll Bar Functions */2308 2309 #if 02310 BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)2311 {2312 #ifdef DEBUG2313 WriteLog("USER32: ScrollDC\n");2314 #endif2315 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);2316 }2317 #endif2318 2319 2272 /* Icon Functions */ 2320 2321 2273 int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon) 2322 2274 { -
trunk/src/user32/win32dlg.cpp
r1333 r1336 1 /* $Id: win32dlg.cpp,v 1.1 6 1999-10-17 12:17:44 cbratschiExp $ */1 /* $Id: win32dlg.cpp,v 1.17 1999-10-17 15:46:09 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 605 605 606 606 dprintf(("Create CONTROL %d", info.id)); 607 hwndCtrl = CreateWindowExW( info.exStyle | WS_EX_NOPARENTNOTIFY, 608 (LPCWSTR)info.className, 609 (LPCWSTR)info.windowName, 610 info.style | WS_CHILD, 611 info.x * xUnit / 4, 612 info.y * yUnit / 8, 613 info.cx * xUnit / 4, 614 info.cy * yUnit / 8, 615 getWindowHandle(), (HMENU)info.id, 616 hInst, info.data ); 607 if(isUnicode) { 608 hwndCtrl = ::CreateWindowExW( info.exStyle | WS_EX_NOPARENTNOTIFY, 609 (LPCWSTR)info.className, 610 (LPCWSTR)info.windowName, 611 info.style | WS_CHILD, 612 info.x * xUnit / 4, 613 info.y * yUnit / 8, 614 info.cx * xUnit / 4, 615 info.cy * yUnit / 8, 616 getWindowHandle(), (HMENU)info.id, 617 hInst, info.data ); 618 } 619 else { 620 char *classNameA = NULL; 621 char *windowNameA = NULL; 622 623 if(HIWORD(info.className)) { 624 classNameA = UnicodeToAsciiString((LPWSTR)info.className); 625 } 626 else classNameA = (char *)info.className; 627 628 if(HIWORD(info.windowName)) { 629 windowNameA = UnicodeToAsciiString((LPWSTR)info.windowName); 630 } 631 hwndCtrl = ::CreateWindowExA( info.exStyle | WS_EX_NOPARENTNOTIFY, 632 classNameA, 633 windowNameA, 634 info.style | WS_CHILD, 635 info.x * xUnit / 4, 636 info.y * yUnit / 8, 637 info.cx * xUnit / 4, 638 info.cy * yUnit / 8, 639 getWindowHandle(), (HMENU)info.id, 640 hInst, info.data ); 641 if(HIWORD(classNameA)) { 642 FreeAsciiString(classNameA); 643 } 644 if(windowNameA) { 645 FreeAsciiString(windowNameA); 646 } 647 } 617 648 618 649 if (!hwndCtrl) return FALSE; -
trunk/src/user32/win32wbase.cpp
r1333 r1336 1 /* $Id: win32wbase.cpp,v 1.4 8 1999-10-17 12:17:45 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.49 1999-10-17 15:46:09 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1238 1238 return NULL; 1239 1239 } 1240 //******************************************************************************1241 //TODO: Not complete1242 //******************************************************************************1243 LONG Win32BaseWindow::setScrollInfo(int nBar, SCROLLINFO *info, int fRedraw)1244 {1245 SCROLLBAR_INFO *infoPtr;1246 HWND hwndScroll;1247 ULONG scrollType;1248 int new_flags;1249 1250 //CB: handled internally1251 return 0;1252 1253 switch(nBar) {1254 case SB_HORZ:1255 if(!horzScrollInfo) {1256 return 0;1257 }1258 infoPtr = horzScrollInfo;1259 hwndScroll = hwndHorzScroll;1260 scrollType = OSLIB_HSCROLL;1261 break;1262 case SB_VERT:1263 if(!vertScrollInfo) {1264 return 0;1265 }1266 infoPtr = vertScrollInfo;1267 hwndScroll = hwndVertScroll;1268 scrollType = OSLIB_VSCROLL;1269 break;1270 default:1271 return 0;1272 }1273 1274 if (info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)) return 0;1275 if ((info->cbSize != sizeof(*info)) &&1276 (info->cbSize != sizeof(*info)-sizeof(info->nTrackPos))) return 0;1277 1278 /* Set the page size */1279 if (info->fMask & SIF_PAGE)1280 {1281 if( infoPtr->Page != info->nPage )1282 {1283 infoPtr->Page = info->nPage;1284 dprintf(("SetScrollInfo: Set pagesize to %d", info->nPage));1285 OSLibWinSetScrollPageSize(OS2HwndFrame, hwndScroll, info->nPage, infoPtr->MaxVal, fRedraw);1286 }1287 }1288 1289 /* Set the scroll pos */1290 if (info->fMask & SIF_POS)1291 {1292 if( infoPtr->CurVal != info->nPos )1293 {1294 infoPtr->CurVal = info->nPos;1295 dprintf(("SetScrollInfo: Set scroll position to %d", info->nPos));1296 OSLibWinSetScrollPos(OS2HwndFrame, hwndScroll, info->nPos, fRedraw);1297 }1298 }1299 1300 /* Set the scroll range */1301 if (info->fMask & SIF_RANGE)1302 {1303 /* Invalid range -> range is set to (0,0) */1304 if ((info->nMin > info->nMax) ||1305 ((UINT)(info->nMax - info->nMin) >= 0x80000000))1306 {1307 infoPtr->MinVal = 0;1308 infoPtr->MaxVal = 0;1309 }1310 else1311 {1312 if( infoPtr->MinVal != info->nMin ||1313 infoPtr->MaxVal != info->nMax )1314 {1315 infoPtr->MinVal = info->nMin;1316 infoPtr->MaxVal = info->nMax;1317 1318 dprintf(("SetScrollInfo: Set scroll range to (%d,%d)", info->nMin, info->nMax));1319 OSLibWinSetScrollRange(OS2HwndFrame, hwndScroll, info->nMin, info->nMax, fRedraw);1320 }1321 }1322 }1323 1324 /* Make sure the page size is valid */1325 if (infoPtr->Page < 0) infoPtr->Page = 0;1326 else if (infoPtr->Page > infoPtr->MaxVal - infoPtr->MinVal + 1 )1327 infoPtr->Page = infoPtr->MaxVal - infoPtr->MinVal + 1;1328 1329 /* Make sure the pos is inside the range */1330 if (infoPtr->CurVal < infoPtr->MinVal)1331 infoPtr->CurVal = infoPtr->MinVal;1332 else if (infoPtr->CurVal > infoPtr->MaxVal - MAX( infoPtr->Page-1, 0 ))1333 infoPtr->CurVal = infoPtr->MaxVal - MAX( infoPtr->Page-1, 0 );1334 1335 /* Check if the scrollbar should be hidden or disabled */1336 if (info->fMask & (SIF_RANGE | SIF_PAGE | SIF_DISABLENOSCROLL))1337 {1338 new_flags = infoPtr->flags;1339 if (infoPtr->MinVal >= infoPtr->MaxVal - MAX( infoPtr->Page-1, 0 ))1340 {1341 /* Hide or disable scroll-bar */1342 if (info->fMask & SIF_DISABLENOSCROLL)1343 {1344 new_flags = ESB_DISABLE_BOTH;1345 // *action |= SA_SSI_REFRESH;1346 }1347 else if (nBar != SB_CTL)1348 {1349 // *action = SA_SSI_HIDE;1350 goto done;1351 }1352 }1353 else /* Show and enable scroll-bar */1354 {1355 new_flags = 0;1356 // if (nBar != SB_CTL)1357 // *action |= SA_SSI_SHOW;1358 }1359 1360 if (infoPtr->flags != new_flags) /* check arrow flags */1361 {1362 infoPtr->flags = new_flags;1363 }1364 }1365 1366 done:1367 /* Return current position */1368 1369 return infoPtr->CurVal;1370 }1371 1240 /***********************************************************************/ 1372 1241 /***********************************************************************/ … … 2011 1880 2012 1881 dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow)); 1882 #if 1 1883 if (flags & WIN_NEED_SIZE) 1884 { 1885 /* should happen only in CreateWindowEx() */ 1886 int wParam = SIZE_RESTORED; 1887 1888 flags &= ~WIN_NEED_SIZE; 1889 if (dwStyle & WS_MAXIMIZE) 1890 wParam = SIZE_MAXIMIZED; 1891 else 1892 if (dwStyle & WS_MINIMIZE) 1893 wParam = SIZE_MINIMIZED; 1894 1895 SendMessageA(WM_SIZE, wParam, 1896 MAKELONG(rectClient.right-rectClient.left, 1897 rectClient.bottom-rectClient.top)); 1898 SendMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) ); 1899 } 1900 #else 2013 1901 if(fFirstShow) { 2014 1902 if(isFrameWindow() && IS_OVERLAPPED(getStyle()) && !isChild()) { … … 2021 1909 fFirstShow = FALSE; 2022 1910 } 1911 #endif 2023 1912 switch(nCmdShow) 2024 1913 { … … 2344 2233 } 2345 2234 //****************************************************************************** 2346 //TODO: not complete nor correct (distinction be tween top-level, top-most & child windows)2347 2235 //****************************************************************************** 2348 2236 HWND Win32BaseWindow::GetWindow(UINT uCmd) 2349 2237 { 2350 Win32BaseWindow *win32wnd; 2351 ULONG magic; 2352 ULONG getcmd = 0; 2353 HWND hwndRelated, hwnd; 2354 2355 dprintf(("GetWindow %x %d NOT COMPLETE", getWindowHandle(), uCmd)); 2356 hwnd = OS2Hwnd; 2238 HWND hwndRelated = 0; 2239 Win32BaseWindow *window; 2240 2357 2241 switch(uCmd) 2358 2242 { 2359 case GW_CHILD: 2360 getcmd = QWOS_TOP; 2361 break; 2362 case GW_HWNDFIRST: 2363 if(getParent()) { 2364 hwnd = getParent()->getOS2WindowHandle(); 2365 getcmd = QWOS_TOP; //top of child windows 2243 case GW_HWNDFIRST: 2244 if(getParent()) { 2245 window = (Win32BaseWindow *)getParent()->getFirstChild(); 2246 hwndRelated = window->getWindowHandle(); 2247 } 2248 break; 2249 2250 case GW_HWNDLAST: 2251 if(getParent()) 2252 { 2253 goto end; 2254 } 2255 2256 window = this; 2257 while(window) 2258 { 2259 window = (Win32BaseWindow *)window->getNextChild(); 2260 } 2261 hwndRelated = window->getWindowHandle(); 2262 break; 2263 2264 case GW_HWNDNEXT: 2265 window = (Win32BaseWindow *)getNextChild(); 2266 if(window) { 2267 hwndRelated = window->getWindowHandle(); 2268 } 2269 break; 2270 2271 case GW_HWNDPREV: 2272 if(!getParent()) 2273 { 2274 goto end; 2275 } 2276 window = (Win32BaseWindow *)(getParent()->getFirstChild()); /* First sibling */ 2277 if(window == this) 2278 { 2279 hwndRelated = 0; /* First in list */ 2280 goto end; 2281 } 2282 while(window->getNextChild()) 2283 { 2284 if (window->getNextChild() == this) 2285 { 2286 hwndRelated = window->getWindowHandle(); 2287 goto end; 2366 2288 } 2367 else getcmd = QWOS_TOP; //TODO 2368 break; 2369 case GW_HWNDLAST: 2370 if(getParent()) { 2371 hwnd = getParent()->getOS2WindowHandle(); 2372 getcmd = QWOS_BOTTOM; //bottom of child windows 2373 } 2374 else getcmd = QWOS_BOTTOM; //TODO 2375 break; 2376 case GW_HWNDNEXT: 2377 getcmd = QWOS_NEXT; 2378 break; 2379 case GW_HWNDPREV: 2380 getcmd = QWOS_PREV; 2381 break; 2382 case GW_OWNER: 2383 if(owner) { 2384 return owner->getWindowHandle(); 2385 } 2386 else return 0; 2387 } 2388 hwndRelated = OSLibWinQueryWindow(hwnd, getcmd); 2389 if(hwndRelated) 2390 { 2391 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32WNDPTR); 2392 magic = OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32PM_MAGIC); 2393 if(CheckMagicDword(magic) && win32wnd) 2394 { 2395 return win32wnd->getWindowHandle(); 2396 } 2397 2398 hwndRelated = OSLibWinWindowFromID(hwndRelated, OSLIB_FID_CLIENT); 2399 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32WNDPTR); 2400 magic = OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32PM_MAGIC); 2401 if(CheckMagicDword(magic) && win32wnd) 2402 { 2403 return win32wnd->getWindowHandle(); 2404 } 2405 } 2406 return 0; 2289 window = (Win32BaseWindow *)window->getNextChild(); 2290 } 2291 break; 2292 2293 case GW_OWNER: 2294 if(getOwner()) { 2295 hwndRelated = getOwner()->getWindowHandle(); 2296 } 2297 break; 2298 2299 case GW_CHILD: 2300 if(getFirstChild()) { 2301 hwndRelated = ((Win32BaseWindow *)getFirstChild())->getWindowHandle(); 2302 } 2303 break; 2304 } 2305 end: 2306 dprintf(("GetWindow %x %d returned %x", getWindowHandle(), uCmd, hwndRelated)); 2307 return hwndRelated; 2407 2308 } 2408 2309 //****************************************************************************** … … 2545 2446 ss.styleOld = dwExStyle; 2546 2447 ss.styleNew = value; 2448 dprintf(("SetWindowLong GWL_EXSTYLE %x new style %x", getWindowHandle(), value)); 2547 2449 SendMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss); 2548 2450 setExStyle(ss.styleNew); … … 2556 2458 ss.styleOld = dwStyle; 2557 2459 ss.styleNew = value; 2460 dprintf(("SetWindowLong GWL_STYLE %x new style %x", getWindowHandle(), value)); 2558 2461 SendMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss); 2559 2462 setStyle(ss.styleNew); -
trunk/src/user32/win32wbase.h
r1333 r1336 1 /* $Id: win32wbase.h,v 1.2 6 1999-10-17 12:17:45 cbratschiExp $ */1 /* $Id: win32wbase.h,v 1.27 1999-10-17 15:46:10 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 182 182 Win32BaseWindow *getTopParent(); 183 183 SCROLLBAR_INFO *getScrollInfo(int nBar); 184 LONG setScrollInfo(int nBar, SCROLLINFO *info, int fRedraw);185 184 HWND getVertScrollHandle() { return hwndVertScroll; }; 186 185 HWND getHorzScrollHandle() { return hwndHorzScroll; }; … … 213 212 ULONG getBorderWidth() { return borderWidth; }; 214 213 ULONG getBorderHeight() { return borderHeight; }; 214 215 static void NC_AdjustRectInner(LPRECT rect, DWORD style, DWORD exStyle); 216 static void NC_AdjustRectOuter(LPRECT rect, DWORD style, BOOL menu, DWORD exStyle); 217 static BOOL WindowNeedsWMBorder( DWORD style, DWORD exStyle ); 215 218 216 219 PVOID getOldWndProc() { return pOldWndProc; } -
trunk/src/user32/win32wbasepos.cpp
r1322 r1336 1 /* $Id: win32wbasepos.cpp,v 1. 2 1999-10-16 14:51:43sandervl Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.3 1999-10-17 15:46:10 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 11 11 * 12 12 * TODO: Not thread/process safe 13 * 14 * Wine code based on build 990815 13 15 * 14 16 * Project Odin Software License can be found in LICENSE.TXT … … 41 43 #include "win32wdesktop.h" 42 44 45 /* Some useful macros */ 43 46 #define HAS_DLGFRAME(style,exStyle) \ 44 47 (((exStyle) & WS_EX_DLGMODALFRAME) || \ 45 (((style) & WS_DLGFRAME) && !((style) & WS_ BORDER)))46 47 #define HAS_THICKFRAME(style ) \48 (((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME))) 49 50 #define HAS_THICKFRAME(style,exStyle) \ 48 51 (((style) & WS_THICKFRAME) && \ 49 !(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME)) 52 !((exStyle) & WS_EX_DLGMODALFRAME)) 53 54 #define HAS_THINFRAME(style) \ 55 (((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP))) 56 57 #define HAS_BIGFRAME(style,exStyle) \ 58 (((style) & (WS_THICKFRAME | WS_DLGFRAME)) || \ 59 ((exStyle) & WS_EX_DLGMODALFRAME)) 60 61 #define HAS_ANYFRAME(style,exStyle) \ 62 (((style) & (WS_THICKFRAME | WS_DLGFRAME | WS_BORDER)) || \ 63 ((exStyle) & WS_EX_DLGMODALFRAME) || \ 64 !((style) & (WS_CHILD | WS_POPUP))) 50 65 51 66 #define HAS_3DFRAME(exStyle) \ … … 194 209 { 195 210 xinc = yinc = 0; 196 if (HAS_THICKFRAME(dwStyle ))211 if (HAS_THICKFRAME(dwStyle, dwExStyle)) 197 212 { 198 213 xinc += GetSystemMetrics(SM_CXFRAME); … … 284 299 dprintf(("NCHandleCalcSize Adjusted client rect (%d,%d) (%d,%d)", ncsize->rgrc[0].left, ncsize->rgrc[0].top, ncsize->rgrc[0].right, ncsize->rgrc[0].bottom)); 285 300 286 #if 0 287 //relative to frame -> relative to itself 288 ncsize->rgrc[0].right -= ncsize->rgrc[0].left; 289 ncsize->rgrc[0].left = 0; 290 ncsize->rgrc[0].bottom -= ncsize->rgrc[0].top; 291 ncsize->rgrc[0].top = 0; 292 #endif 301 OffsetRect(&ncsize->rgrc[0], -ncsize->rgrc[0].left, -ncsize->rgrc[0].top); 293 302 } 294 303 #if 0 … … 299 308 return result; 300 309 } 310 /*********************************************************************** 311 * WIN_WindowNeedsWMBorder 312 * 313 * This method defines the rules for a window to have a WM border, 314 * caption... It is used for consitency purposes. 315 */ 316 BOOL Win32BaseWindow::WindowNeedsWMBorder( DWORD style, DWORD exStyle ) 317 { 318 // if (!(style & WS_CHILD) && Options.managed && 319 if (!(style & WS_CHILD) && 320 (((style & WS_CAPTION) == WS_CAPTION) || 321 (style & WS_THICKFRAME))) 322 return TRUE; 323 return FALSE; 324 } 325 /****************************************************************************** 326 * NC_AdjustRectOuter95 327 * 328 * Computes the size of the "outside" parts of the window based on the 329 * parameters of the client area. 330 * 331 + PARAMS 332 * LPRECT16 rect 333 * DWORD style 334 * BOOL32 menu 335 * DWORD exStyle 336 * 337 * NOTES 338 * "Outer" parts of a window means the whole window frame, caption and 339 * menu bar. It does not include "inner" parts of the frame like client 340 * edge, static edge or scroll bars. 341 * 342 * Revision history 343 * 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu) 344 * Original (NC_AdjustRect95) cut & paste from NC_AdjustRect 345 * 346 * 20-Jun-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de) 347 * Split NC_AdjustRect95 into NC_AdjustRectOuter95 and 348 * NC_AdjustRectInner95 and added handling of Win95 styles. 349 * 350 * 28-Jul-1999 Ove Kåven (ovek@arcticnet.no) 351 * Streamlined window style checks. 352 * 353 *****************************************************************************/ 354 void Win32BaseWindow::NC_AdjustRectOuter(LPRECT rect, DWORD style, BOOL menu, DWORD exStyle) 355 { 356 if(style & WS_ICONIC) return; 357 358 /* Decide if the window will be managed (see CreateWindowEx) */ 359 // if (!WindowNeedsWMBorder(style, exStyle)) 360 // { 361 if (HAS_THICKFRAME( style, exStyle )) 362 InflateRect( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) ); 363 else 364 if (HAS_DLGFRAME( style, exStyle )) 365 InflateRect(rect, GetSystemMetrics(SM_CXDLGFRAME), GetSystemMetrics(SM_CYDLGFRAME) ); 366 else 367 if (HAS_THINFRAME( style )) 368 InflateRect( rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER)); 369 370 if ((style & WS_CAPTION) == WS_CAPTION) 371 { 372 if (exStyle & WS_EX_TOOLWINDOW) 373 rect->top -= GetSystemMetrics(SM_CYSMCAPTION); 374 else 375 rect->top -= GetSystemMetrics(SM_CYCAPTION); 376 } 377 // } 378 379 if (menu) 380 rect->top -= GetSystemMetrics(SM_CYMENU); 381 } 382 /****************************************************************************** 383 * NC_AdjustRectInner95 384 * 385 * Computes the size of the "inside" part of the window based on the 386 * parameters of the client area. 387 * 388 + PARAMS 389 * LPRECT16 rect 390 * DWORD style 391 * DWORD exStyle 392 * 393 * NOTES 394 * "Inner" part of a window means the window frame inside of the flat 395 * window frame. It includes the client edge, the static edge and the 396 * scroll bars. 397 * 398 * Revision history 399 * 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu) 400 * Original (NC_AdjustRect95) cut & paste from NC_AdjustRect 401 * 402 * 20-Jun-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de) 403 * Split NC_AdjustRect95 into NC_AdjustRectOuter95 and 404 * NC_AdjustRectInner95 and added handling of Win95 styles. 405 * 406 *****************************************************************************/ 407 void Win32BaseWindow::NC_AdjustRectInner(LPRECT rect, DWORD style, DWORD exStyle) 408 { 409 if(style & WS_ICONIC) return; 410 411 if (exStyle & WS_EX_CLIENTEDGE) 412 InflateRect(rect, GetSystemMetrics(SM_CXEDGE), GetSystemMetrics(SM_CYEDGE)); 413 414 if (exStyle & WS_EX_STATICEDGE) 415 InflateRect(rect, GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER)); 416 417 if (style & WS_VSCROLL) rect->right += GetSystemMetrics(SM_CXVSCROLL); 418 if (style & WS_HSCROLL) rect->bottom += GetSystemMetrics(SM_CYHSCROLL); 419 } 301 420 //****************************************************************************** 302 421 //****************************************************************************** -
trunk/src/user32/window.cpp
r1307 r1336 1 /* $Id: window.cpp,v 1.1 6 1999-10-15 10:03:16sandervl Exp $ */1 /* $Id: window.cpp,v 1.17 1999-10-17 15:46:10 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 29 29 #include "user32.h" 30 30 #include "winicon.h" 31 #include <win\winpos.h> 31 32 32 33 //****************************************************************************** … … 58 59 { 59 60 if (!HIWORD(className)) { 60 dprintf(("CreateWindowEx32 W: bad class name %04x\n", LOWORD(className)));61 dprintf(("CreateWindowEx32A: bad class name %04x\n", LOWORD(className))); 61 62 } 62 else dprintf(("CreateWindowEx32 W: bad class name '%s'\n", className ));63 else dprintf(("CreateWindowEx32A: bad class name '%s'\n", className )); 63 64 64 65 SetLastError(ERROR_INVALID_PARAMETER); … … 81 82 cs.dwExStyle = exStyle; 82 83 if(HIWORD(className)) { 83 84 dprintf(("CreateWindowExA: class %s parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle)); 84 85 } 85 86 else dprintf(("CreateWindowExA: class %d parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle)); … … 88 89 window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, FALSE); 89 90 } 90 else 91 if(!strcmpi((char *) className, DIALOG_CLASS_NAMEA)) 91 else 92 if(!strcmpi((char *) className, DIALOG_CLASS_NAMEA)) 92 93 { 93 94 DLG_TEMPLATE dlgTemplate = {0}; … … 146 147 { 147 148 sprintf(tmpClassA,"#%d", (int) className); 148 AsciiToUnicode(tmpClassA, tmpClassW);149 AsciiToUnicode(tmpClassA, tmpClassW); 149 150 classAtom = GlobalFindAtomW(tmpClassW); 150 151 className = (LPCWSTR)tmpClassW; … … 155 156 dprintf(("CreateWindowEx32W: bad class name %04x\n", LOWORD(className))); 156 157 } 157 158 else dprintf(("CreateWindowEx32W: bad class name ")); 158 159 159 160 SetLastError(ERROR_INVALID_PARAMETER); … … 180 181 } 181 182 else 182 if(!lstrcmpiW(className, (LPWSTR)DIALOG_CLASS_NAMEW)) 183 if(!lstrcmpiW(className, (LPWSTR)DIALOG_CLASS_NAMEW)) 183 184 { 184 185 DLG_TEMPLATE dlgTemplate = {0}; … … 258 259 if(!window) { 259 260 dprintf(("CreateMDIWindowW, window %x not found", hwndParent)); 260 261 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 261 262 return 0; 262 263 } … … 284 285 if(!window) { 285 286 dprintf(("DestroyWindow, window %x not found", hwnd)); 286 287 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 287 288 return 0; 288 289 } … … 299 300 if(!window) { 300 301 dprintf(("SetActiveWindow, window %x not found", hwnd)); 301 302 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 302 303 return 0; 303 304 } … … 314 315 if(!window) { 315 316 dprintf(("GetParent, window %x not found", hwnd)); 316 317 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 317 318 return 0; 318 319 } … … 329 330 if(!window) { 330 331 dprintf(("SetParent, window %x not found", hwndChild)); 331 332 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 332 333 return 0; 333 334 } … … 344 345 if(!window) { 345 346 dprintf(("IsChild, window %x not found", hwnd)); 346 347 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 347 348 return 0; 348 349 } … … 359 360 if(!window) { 360 361 dprintf(("GetTopWindow, window %x not found", hwnd)); 361 362 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 362 363 return 0; 363 364 } … … 389 390 if(!window) { 390 391 dprintf(("IsIconic, window %x not found", hwnd)); 391 392 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 392 393 return 0; 393 394 } … … 405 406 if(!window) { 406 407 dprintf(("GetWindow, window %x not found", hwnd)); 407 408 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 408 409 return 0; 409 410 } 410 411 rc = window->GetWindow(uCmd); 411 dprintf(("GetWindow %x %d returned %x", hwnd, uCmd, rc));412 412 return rc; 413 413 } … … 421 421 if(!window) { 422 422 dprintf(("EnableWindow, window %x not found", hwnd)); 423 423 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 424 424 return 0; 425 425 } … … 448 448 if(!window) { 449 449 dprintf(("ShowWindow, window %x not found", hwnd)); 450 450 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 451 451 return 0; 452 452 } … … 463 463 if(!window) { 464 464 dprintf(("SetWindowPos, window %x not found", hwnd)); 465 465 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 466 466 return 0; 467 467 } … … 522 522 if(!window) { 523 523 dprintf(("IsWindowVisible, window %x not found", hwnd)); 524 524 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 525 525 return 0; 526 526 } … … 553 553 dprintf(("USER32: GetFocus %x\n", hwnd)); 554 554 hwnd = Win32BaseWindow::OS2ToWin32Handle(hwnd); 555 return hwnd; 555 return hwnd; 556 556 } 557 557 //****************************************************************************** … … 625 625 if(!window) { 626 626 dprintf(("GetWindowRect, window %x not found", hwnd)); 627 627 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 628 628 return 0; 629 629 } … … 641 641 if(!window) { 642 642 dprintf(("GetWindowTextLength, window %x not found", hwnd)); 643 643 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 644 644 return 0; 645 645 } … … 657 657 if(!window) { 658 658 dprintf(("GetWindowTextA, window %x not found", hwnd)); 659 659 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 660 660 return 0; 661 661 } … … 680 680 if(!window) { 681 681 dprintf(("GetWindowTextW, window %x not found", hwnd)); 682 682 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 683 683 return 0; 684 684 } … … 695 695 if(!window) { 696 696 dprintf(("SetWindowTextA, window %x not found", hwnd)); 697 697 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 698 698 return 0; 699 699 } … … 710 710 if(!window) { 711 711 dprintf(("SetWindowTextA, window %x not found", hwnd)); 712 712 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 713 713 return 0; 714 714 } … … 746 746 HWND hwndWin32 = hwnd; 747 747 748 #if 1 749 Win32BaseWindow *window; 750 751 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 752 if(!window) { 753 dprintf(("GetClientRect, window %x not found", hwnd)); 754 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 755 return 0; 756 } 757 *pRect = *window->getClientRect(); 758 OffsetRect(pRect, -pRect->left, -pRect->top); 759 dprintf(("GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwndWin32, pRect->left, pRect->top, pRect->right, pRect->bottom)); 760 return TRUE; 761 #else 748 762 hwnd = Win32BaseWindow::Win32ToOS2Handle(hwnd); 749 763 rc = OSLibWinQueryWindowRect(hwnd, pRect); 750 764 dprintf(("GetClientRect of %X returned (%d,%d) (%d,%d)\n", hwndWin32, pRect->left, pRect->top, pRect->right, pRect->bottom)); 751 765 return rc; 752 }753 //******************************************************************************754 //******************************************************************************755 BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)756 {757 #ifdef DEBUG758 WriteLog("USER32: AdjustWindowRect\n");759 766 #endif 760 return O32_AdjustWindowRect(arg1, arg2, arg3); 761 } 762 //****************************************************************************** 763 //****************************************************************************** 764 BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4) 765 { 766 #ifdef DEBUG 767 WriteLog("USER32: AdjustWindowRectEx\n"); 767 } 768 //****************************************************************************** 769 //****************************************************************************** 770 BOOL WIN32API AdjustWindowRect(PRECT rect, DWORD style, BOOL menu) 771 { 772 return AdjustWindowRectEx(rect, style, menu, 0); 773 } 774 //****************************************************************************** 775 //****************************************************************************** 776 BOOL WIN32API AdjustWindowRectEx( PRECT rect, DWORD style, BOOL menu, DWORD exStyle) 777 { 778 dprintf(("AdjustWindowRectEx %x %x %d (%d,%d)(%d,%d)\n", style, exStyle, menu, rect->right, rect->top, rect->left, rect->bottom)); 779 780 #if 0 781 O32_AdjustWindowRectEx(rect, style, menu, exStyle); 782 #else 783 /* Correct the window style */ 784 if (!(style & (WS_POPUP | WS_CHILD))) /* Overlapped window */ 785 style |= WS_CAPTION; 786 787 style &= (WS_DLGFRAME | WS_BORDER | WS_THICKFRAME | WS_CHILD | WS_VSCROLL | WS_HSCROLL); 788 exStyle &= (WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | 789 WS_EX_STATICEDGE | WS_EX_TOOLWINDOW); 790 if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME; 791 792 Win32BaseWindow::NC_AdjustRectOuter( rect, style, menu, exStyle ); 793 Win32BaseWindow::NC_AdjustRectInner( rect, style, exStyle ); 768 794 #endif 769 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4); 795 796 dprintf(("AdjustWindowRectEx returned (%d,%d)(%d,%d)\n", rect->right, rect->top, rect->left, rect->bottom)); 797 return TRUE; 770 798 } 771 799 //****************************************************************************** … … 781 809 { 782 810 if(!lpszClass) { 783 784 811 SetLastError(ERROR_INVALID_PARAMETER); 812 return 0; 785 813 } 786 814 if(HIWORD(lpszClass)) { … … 793 821 //****************************************************************************** 794 822 //****************************************************************************** 823 HWND WIN32API FindWindowW( LPCWSTR lpClassName, LPCWSTR lpWindowName) 824 { 825 char *astring1 = UnicodeToAsciiString((LPWSTR)lpClassName); 826 char *astring2 = UnicodeToAsciiString((LPWSTR)lpWindowName); 827 HWND rc; 828 829 rc = FindWindowA(astring1, astring2); 830 FreeAsciiString(astring1); 831 FreeAsciiString(astring2); 832 return rc; 833 } 834 //****************************************************************************** 835 //****************************************************************************** 795 836 HWND WIN32API FindWindowExA(HWND hwndParent, HWND hwndChildAfter, LPCSTR lpszClass, LPCSTR lpszWindow) 796 837 { 797 838 if(!lpszClass) { 798 799 839 SetLastError(ERROR_INVALID_PARAMETER); 840 return 0; 800 841 } 801 842 if(HIWORD(lpszClass)) { … … 833 874 { 834 875 if(!lpszClass) { 835 836 876 SetLastError(ERROR_INVALID_PARAMETER); 877 return 0; 837 878 } 838 879 dprintf(("USER32: FindWindowExW (%x,%x) %x %s\n", hwndParent, hwndChildAfter, lpszClass, lpszWindow)); … … 870 911 871 912 if (!hwnd) { 872 873 913 SetLastError(ERROR_INVALID_PARAMETER); 914 return (FALSE); 874 915 } 875 916 wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 876 917 if (!wnd) { 877 878 918 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 919 return (FALSE); 879 920 } 880 921 … … 887 928 //****************************************************************************** 888 929 //****************************************************************************** 889 HDWP WIN32API BeginDeferWindowPos( int arg1) 890 { 891 #ifdef DEBUG 892 WriteLog("USER32: BeginDeferWindowPos\n"); 930 HDWP WIN32API BeginDeferWindowPos(int count) 931 { 932 HDWP handle; 933 DWP *pDWP; 934 935 dprintf(("USER32: BeginDeferWindowPos\n")); 936 if (count <= 0) 937 { 938 SetLastError(ERROR_INVALID_PARAMETER); 939 return 0; 940 } 941 handle = (HDWP)HeapAlloc(GetProcessHeap(), 0, sizeof(DWP) + (count-1)*sizeof(WINDOWPOS) ); 942 if (!handle) 943 return 0; 944 945 pDWP = (DWP *) handle; 946 pDWP->actualCount = 0; 947 pDWP->suggestedCount = count; 948 pDWP->valid = TRUE; 949 pDWP->wMagic = DWP_MAGIC; 950 pDWP->hwndParent = 0; 951 return handle; 952 } 953 /*********************************************************************** 954 * DeferWindowPos (USER32.128) 955 */ 956 HDWP WIN32API DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter, 957 INT x, INT y, INT cx, INT cy, 958 UINT flags ) 959 { 960 DWP *pDWP; 961 int i; 962 HDWP newhdwp = hdwp,retvalue; 963 Win32BaseWindow *window; 964 965 pDWP = (DWP *)hdwp; 966 if (!pDWP) { 967 SetLastError(ERROR_INVALID_PARAMETER); 968 return 0; 969 } 970 971 if (hwnd == GetDesktopWindow()) 972 return 0; 973 974 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 975 if(!window) { 976 dprintf(("DeferWindowPos, window %x not found", hwnd)); 977 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 978 HeapFree(GetProcessHeap(), 0, (LPVOID)hdwp); 979 return 0; 980 } 981 982 983 /* Numega Bounds Checker Demo dislikes the following code. 984 In fact, I've not been able to find any "same parent" requirement in any docu 985 [AM 980509] 986 */ 987 #if 0 988 /* All the windows of a DeferWindowPos() must have the same parent */ 989 parent = pWnd->parent->hwndSelf; 990 if (pDWP->actualCount == 0) pDWP->hwndParent = parent; 991 else if (parent != pDWP->hwndParent) 992 { 993 USER_HEAP_FREE( hdwp ); 994 retvalue = 0; 995 goto END; 996 } 893 997 #endif 894 return O32_BeginDeferWindowPos(arg1); 895 } 896 //****************************************************************************** 897 //****************************************************************************** 898 HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8) 899 { 900 #ifdef DEBUG 901 WriteLog("USER32: DeferWindowPos\n"); 902 #endif 903 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); 998 999 for (i = 0; i < pDWP->actualCount; i++) 1000 { 1001 if (pDWP->winPos[i].hwnd == hwnd) 1002 { 1003 /* Merge with the other changes */ 1004 if (!(flags & SWP_NOZORDER)) 1005 { 1006 pDWP->winPos[i].hwndInsertAfter = hwndAfter; 1007 } 1008 if (!(flags & SWP_NOMOVE)) 1009 { 1010 pDWP->winPos[i].x = x; 1011 pDWP->winPos[i].y = y; 1012 } 1013 if (!(flags & SWP_NOSIZE)) 1014 { 1015 pDWP->winPos[i].cx = cx; 1016 pDWP->winPos[i].cy = cy; 1017 } 1018 pDWP->winPos[i].flags &= flags | ~(SWP_NOSIZE | SWP_NOMOVE | 1019 SWP_NOZORDER | SWP_NOREDRAW | 1020 SWP_NOACTIVATE | SWP_NOCOPYBITS| 1021 SWP_NOOWNERZORDER); 1022 pDWP->winPos[i].flags |= flags & (SWP_SHOWWINDOW | SWP_HIDEWINDOW | 1023 SWP_FRAMECHANGED); 1024 retvalue = hdwp; 1025 goto END; 1026 } 1027 } 1028 if (pDWP->actualCount >= pDWP->suggestedCount) 1029 { 1030 newhdwp = (HDWP)HeapReAlloc(GetProcessHeap(), 0, (LPVOID)hdwp, 1031 sizeof(DWP) + pDWP->suggestedCount*sizeof(WINDOWPOS)); 1032 if (!newhdwp) 1033 { 1034 retvalue = 0; 1035 goto END; 1036 } 1037 pDWP = (DWP *) newhdwp; 1038 pDWP->suggestedCount++; 1039 } 1040 pDWP->winPos[pDWP->actualCount].hwnd = hwnd; 1041 pDWP->winPos[pDWP->actualCount].hwndInsertAfter = hwndAfter; 1042 pDWP->winPos[pDWP->actualCount].x = x; 1043 pDWP->winPos[pDWP->actualCount].y = y; 1044 pDWP->winPos[pDWP->actualCount].cx = cx; 1045 pDWP->winPos[pDWP->actualCount].cy = cy; 1046 pDWP->winPos[pDWP->actualCount].flags = flags; 1047 pDWP->actualCount++; 1048 retvalue = newhdwp; 1049 END: 1050 return retvalue; 1051 } 1052 //****************************************************************************** 1053 //****************************************************************************** 1054 BOOL WIN32API EndDeferWindowPos( HDWP hdwp) 1055 { 1056 DWP *pDWP; 1057 WINDOWPOS *winpos; 1058 BOOL res = TRUE; 1059 int i; 1060 1061 dprintf(("EndDeferWindowPos\n")); 1062 pDWP = (DWP *) hdwp; 1063 if (!pDWP) { 1064 SetLastError(ERROR_INVALID_PARAMETER); 1065 return FALSE; 1066 } 1067 for (i = 0, winpos = pDWP->winPos; i < pDWP->actualCount; i++, winpos++) 1068 { 1069 if (!(res = SetWindowPos(winpos->hwnd, winpos->hwndInsertAfter, 1070 winpos->x, winpos->y, winpos->cx, 1071 winpos->cy, winpos->flags ))) 1072 break; 1073 } 1074 HeapFree(GetProcessHeap(), 0, (LPVOID)hdwp); 1075 return res; 904 1076 } 905 1077 //****************************************************************************** … … 940 1112 if (GetWindowRect (hwndParent, &rect) == 0) { 941 1113 // oops, invalid handle 942 1114 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 943 1115 return NULL; 944 1116 } … … 985 1157 } 986 1158 987 1159 dprintf(("ChildWindowFromPointEx returned %x", hWnd)); 988 1160 // found it! 989 1161 return hWnd; … … 992 1164 // the point is in the parentwindow but the parentwindow has no child 993 1165 // at this coordinate 994 1166 dprintf(("ChildWindowFromPointEx returned parent %x", hwndParent)); 995 1167 return hwndParent; 996 1168 } … … 1004 1176 if(!window) { 1005 1177 dprintf(("CloseWindow, window %x not found", hwnd)); 1006 1178 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1007 1179 return 0; 1008 1180 } … … 1033 1205 if(!window) { 1034 1206 dprintf(("IsWindowUnicode, window %x not found", hwnd)); 1035 1207 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1036 1208 return 0; 1037 1209 } … … 1139 1311 if(!parentwindow) { 1140 1312 dprintf(("EnumChildWindows, window %x not found", hwnd)); 1141 1313 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1142 1314 return FALSE; 1143 1315 }
Note:
See TracChangeset
for help on using the changeset viewer.