Ignore:
Timestamp:
Jun 9, 2002, 9:53:32 PM (23 years ago)
Author:
sandervl
Message:

WS_CHILD style change in SetWindowLong (GWL_STYLE) *is* allowed

File:
1 edited

Legend:

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

    r8553 r8624  
    1 /* $Id: win32wbase.cpp,v 1.327 2002-06-02 19:34:31 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.328 2002-06-09 19:53:32 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    8282static int iMenuSysKey = 0;
    8383
    84 
    85 
    86 /***
    87  * Performance Optimization:
    88  * we're directly inlining this micro function from win32wndhandle.cpp.
    89  * Changes there must be reflected here.
    90  ***/
    91 extern ULONG WindowHandleTable[MAX_WINDOW_HANDLES];
    92 
    93 BOOL INLINE i_HwGetWindowHandleData(HWND hwnd, DWORD *pdwUserData)
    94 {
    95   if((hwnd & 0xFFFF0000) != WNDHANDLE_MAGIC_HIGHWORD) {
    96         return FALSE; //unknown window (PM?)
    97   }
    98   hwnd &= WNDHANDLE_MAGIC_MASK;
    99   if(hwnd < MAX_WINDOW_HANDLES) {
    100         *pdwUserData = WindowHandleTable[hwnd];
    101         return TRUE;
    102   }
    103   *pdwUserData = 0;
    104   return FALSE;
    105 }
    106 #define HwGetWindowHandleData(a,b) i_HwGetWindowHandleData(a,b)
    107 
    108 
    10984//******************************************************************************
    11085//******************************************************************************
     
    508483    {
    509484        SetParent(cs->hwndParent);
    510 //        owner = GetWindowFromHandle(cs->hwndParent);
    511485        owner = 0;
    512 /*        if(owner == NULL)
    513         {
    514             dprintf(("HwGetWindowHandleData couldn't find owner window %x!!!", cs->hwndParent));
    515             SetLastError(ERROR_INVALID_WINDOW_HANDLE);
    516             return FALSE;
    517         }*/
    518486        //SvL: Shell positioning shouldn't be done for child windows! (breaks Notes)
    519487        fXDefault = fCXDefault = FALSE;
     
    23142282        swp |= SWP_NOACTIVATE | SWP_NOZORDER;
    23152283
    2316     dprintf(("ShowWindow : SetWindowPos now"));   
    23172284    if (!(getStyle() & WS_MINIMIZE)) {
    23182285         SetWindowPos(HWND_TOP, newPos.left, newPos.top, newPos.right, newPos.bottom, LOWORD(swp));
     
    27962763        getParent()->addChild(this);
    27972764        fParentChange = TRUE;
    2798 
    27992765        OSLibWinSetParent(getOS2FrameWindowHandle(), getParent()->getOS2WindowHandle());
    28002766        if(!(getStyle() & WS_CHILD))
     
    35463512        case GWL_STYLE:
    35473513        {
    3548            STYLESTRUCT ss;
     3514                STYLESTRUCT ss;
    35493515
    35503516                //SvL: TODO: Can you change minimize or maximize status here too?
     
    35553521                }
    35563522                dprintf(("SetWindowLong GWL_STYLE %x old %x new style %x (%x)", getWindowHandle(), dwStyle, value));
    3557 #ifdef DEBUG
    3558 //                if((value & WS_CHILD) != (dwStyle & WS_CHILD)) {
    3559 //                    DebugInt3(); //is this allowed?
    3560 //                }
    3561 #endif
    3562                 value &= ~(WS_CHILD);
     3523               
     3524                //Changing WS_CHILD style is allowed
    35633525                ss.styleOld = getStyle();
    3564                 ss.styleNew = value | (ss.styleOld & WS_CHILD);
     3526                ss.styleNew = value;
    35653527                SendMessageA(getWindowHandle(),WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);
    35663528                setStyle(ss.styleNew);
Note: See TracChangeset for help on using the changeset viewer.