Changeset 3663 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Jun 7, 2000, 11:45:52 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r3662 r3663 1 /* $Id: win32wbase.cpp,v 1.19 8 2000-06-07 14:51:30 sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.199 2000-06-07 21:45:50 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1158 1158 //****************************************************************************** 1159 1159 //****************************************************************************** 1160 BOOL Win32BaseWindow::isDesktopWindow() 1161 { 1162 return FALSE; 1163 } 1164 //****************************************************************************** 1165 //****************************************************************************** 1160 1166 BOOL Win32BaseWindow::IsWindowIconic() 1161 1167 { … … 2395 2401 Win32BaseWindow *Win32BaseWindow::getParent() 2396 2402 { 2397 Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow:: GetParent();2403 Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow::getParentOfChild(); 2398 2404 return ((ULONG)wndparent == (ULONG)windowDesktop) ? NULL : wndparent; 2399 2405 } … … 2402 2408 HWND Win32BaseWindow::GetParent() 2403 2409 { 2410 if((!(getStyle() & (WS_POPUP|WS_CHILD)))) { 2411 return 0; 2412 } 2413 2414 Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow::getParentOfChild(); 2415 2404 2416 if(getStyle() & WS_CHILD) { 2405 if( getParent()) {2406 return getParent()->getWindowHandle();2417 if(wndparent) { 2418 return wndparent->getWindowHandle(); 2407 2419 } 2420 dprintf(("WARNING: GetParent: WS_CHILD but no parent!!")); 2408 2421 DebugInt3(); 2409 2422 return 0; … … 2417 2430 HWND oldhwnd; 2418 2431 Win32BaseWindow *newparent; 2419 Win32BaseWindow *oldparent = (Win32BaseWindow *)ChildWindow:: GetParent();2432 Win32BaseWindow *oldparent = (Win32BaseWindow *)ChildWindow::getParentOfChild(); 2420 2433 BOOL fShow = FALSE; 2421 2434 2422 2435 if(oldparent) { 2423 2436 oldhwnd = oldparent->getWindowHandle(); 2424 oldparent-> RemoveChild(this);2437 oldparent->removeChild(this); 2425 2438 } 2426 2439 else oldhwnd = 0; … … 2434 2447 2435 2448 newparent = GetWindowFromHandle(hwndNewParent); 2436 if(newparent )2449 if(newparent && !newparent->isDesktopWindow()) 2437 2450 { 2438 2451 setParent(newparent); 2439 getParent()-> AddChild(this);2452 getParent()->addChild(this); 2440 2453 OSLibWinSetParent(getOS2WindowHandle(), getParent()->getOS2WindowHandle()); 2454 if(!(getStyle() & WS_CHILD)) 2455 { 2456 //TODO: Send WM_STYLECHANGED msg? 2457 setStyle(getStyle() | WS_CHILD); 2458 if(getWindowId()) 2459 { 2460 DestroyMenu( (HMENU) getWindowId() ); 2461 setWindowId(0); 2462 } 2463 } 2441 2464 } 2442 2465 else { 2443 2466 setParent(windowDesktop); 2444 windowDesktop-> AddChild(this);2467 windowDesktop->addChild(this); 2445 2468 OSLibWinSetParent(getOS2WindowHandle(), OSLIB_HWND_DESKTOP); 2469 2470 //TODO: Send WM_STYLECHANGED msg? 2471 setStyle(getStyle() & ~WS_CHILD); 2472 setWindowId(0); 2446 2473 } 2447 2474 /* SetParent additionally needs to make hwndChild the topmost window
Note:
See TracChangeset
for help on using the changeset viewer.