Changeset 1540 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Nov 1, 1999, 8:11:46 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r1526 r1540 1 /* $Id: win32wbase.cpp,v 1.7 0 1999-10-31 01:14:42sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.71 1999-11-01 19:11:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 39 39 #include "win32wdesktop.h" 40 40 #include "pmwindow.h" 41 #include "controls.h" 41 42 #include <wprocess.h> 42 43 … … 75 76 76 77 void PrintWindowStyle(DWORD dwStyle, DWORD dwExStyle); 78 79 static fDestroyAll = FALSE; 77 80 78 81 //****************************************************************************** … … 199 202 OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_MAGIC, 0); 200 203 201 if( getParent() && getParent()->getFirstChild() == this && getNextChild() == NULL)204 if(!fDestroyAll && getParent() && getParent()->getFirstChild() == this && getNextChild() == NULL) 202 205 { 203 206 //if we're the last child that's being destroyed and our … … 210 213 } 211 214 } 215 else 216 if(fDestroyAll) { 217 dprintf(("Destroying window %x %s", getWindowHandle(), windowNameA)); 218 setParent(NULL); //or else we'll crash in the dtor of the ChildWindow class 219 } 220 212 221 if (isOwnDC()) 213 222 releaseOwnDC (ownDC); … … 234 243 horzScrollInfo = NULL; 235 244 } 245 } 246 //****************************************************************************** 247 //****************************************************************************** 248 void Win32BaseWindow::DestroyAll() 249 { 250 fDestroyAll = TRUE; 251 GenericObject::DestroyAll(windows); 236 252 } 237 253 //****************************************************************************** … … 414 430 dwExStyle = cs->dwExStyle; 415 431 416 #if 1417 //SvL: Messes up Z-order of dialog controls418 432 hwndLinkAfter = HWND_TOP; 419 #else 420 hwndLinkAfter = ((cs->style & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD) 421 ? HWND_BOTTOM : HWND_TOP; 422 #endif 433 if(WIDGETS_IsControl(this, BUTTON_CONTROL) && ((dwStyle & 0x0f) == BS_GROUPBOX)) 434 { 435 hwndLinkAfter = HWND_BOTTOM; 436 dwStyle |= WS_CLIPSIBLINGS; 437 } 438 else 439 if(WIDGETS_IsControl(this, STATIC_CONTROL) && !(dwStyle & WS_GROUP)) { 440 dwStyle |= WS_CLIPSIBLINGS; 441 } 423 442 424 443 /* Increment class window counter */ … … 524 543 return FALSE; 525 544 } 545 526 546 SetLastError(0); 527 547 return TRUE; … … 622 642 623 643 if(getParent()) { 624 SetWindowPos( getParent()->getWindowHandle(), rectClient.left, rectClient.top,644 SetWindowPos(hwndLinkAfter, rectClient.left, rectClient.top, 625 645 rectClient.right-rectClient.left, 626 646 rectClient.bottom-rectClient.top, 627 SWP_NOACTIVATE | SWP_NO ZORDER | SWP_NOREDRAW);647 SWP_NOACTIVATE | SWP_NOREDRAW); 628 648 } 629 649 else { 630 SetWindowPos( HWND_TOP, rectClient.left, rectClient.top,650 SetWindowPos(hwndLinkAfter, rectClient.left, rectClient.top, 631 651 rectClient.right-rectClient.left, 632 652 rectClient.bottom-rectClient.top, … … 810 830 { 811 831 lastHitTestVal = SendInternalMessageA(WM_NCHITTEST, 0, MAKELONG((USHORT)x, (USHORT)y)); 832 dprintf(("MsgHitTest returned %x", lastHitTestVal)); 812 833 return 1; //TODO: May need to change this 813 834 } … … 1095 1116 && hwndTop != GetForegroundWindow() ) 1096 1117 { 1097 SetActiveWindow();1118 ::SetActiveWindow(hwndTop); 1098 1119 } 1099 1120 } … … 1421 1442 case WM_MOUSEACTIVATE: 1422 1443 { 1423 DWORD dwStyle = GetWindowLongA(GWL_STYLE);1424 DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE);1425 1444 dprintf(("DefWndProc: WM_MOUSEACTIVATE for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam)))); 1426 if( dwStyle & WS_CHILD && !(dwExStyle& WS_EX_NOPARENTNOTIFY) )1445 if(getStyle() & WS_CHILD && !(getExStyle() & WS_EX_NOPARENTNOTIFY) ) 1427 1446 { 1428 1447 if(getParent()) { … … 1435 1454 case WM_SETCURSOR: 1436 1455 { 1437 DWORD dwStyle = GetWindowLongA(GWL_STYLE);1438 DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE);1439 1456 dprintf(("DefWndProc: WM_SETCURSOR for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam)))); 1440 if( dwStyle & WS_CHILD && !(dwExStyle& WS_EX_NOPARENTNOTIFY) )1457 if(getStyle() & WS_CHILD && !(getExStyle() & WS_EX_NOPARENTNOTIFY) ) 1441 1458 { 1442 1459 if(getParent()) { … … 1905 1922 { 1906 1923 ULONG showstate = 0; 1924 HWND hWinAfter; 1907 1925 1908 1926 dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow)); … … 1972 1990 } 1973 1991 1992 /* We can't activate a child window (WINE) */ 1993 if(getStyle() & WS_CHILD) 1994 showstate &= ~SWPOS_ACTIVATE; 1995 1974 1996 if(showstate & SWPOS_SHOW) { 1975 1997 setStyle(getStyle() | WS_VISIBLE);
Note:
See TracChangeset
for help on using the changeset viewer.