Ignore:
Timestamp:
Jul 4, 2001, 11:29:52 AM (24 years ago)
Author:
sandervl
Message:

SetParent bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r6040 r6166  
    1 /* $Id: win32wbase.cpp,v 1.271 2001-06-17 21:08:01 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.272 2001-07-04 09:29:51 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    106106  fInternalMsg     = FALSE;
    107107  fNoSizeMsg       = FALSE;
     108  fParentChange    = FALSE;
    108109  fIsDestroyed     = FALSE;
    109110  fDestroyWindowCalled = FALSE;
     
    27872788   }
    27882789   if(oldparent) {
     2790        //release parent here (increased refcount during creation)
    27892791        RELEASE_WNDOBJ(oldparent);
    27902792   }
     
    27942796        setParent(newparent);
    27952797        getParent()->addChild(this);
     2798        fParentChange = TRUE;
     2799
    27962800        OSLibWinSetParent(getOS2FrameWindowHandle(), getParent()->getOS2WindowHandle());
    27972801        if(!(getStyle() & WS_CHILD))
     
    28052809            }
    28062810        }
     2811        //SvL: Even though the win32 coordinates might not change, the PM
     2812        //     coordinates can. We must make sure the control stays at the
     2813        //     same position (y) relative to the (new) parent.
     2814        SetWindowPos(HWND_TOPMOST, rectWindow.left, rectWindow.top, 0, 0,
     2815                     SWP_NOACTIVATE|SWP_NOSIZE);
     2816        fParentChange = FALSE;
    28072817   }
    28082818   else {
Note: See TracChangeset for help on using the changeset viewer.