Ignore:
Timestamp:
Jan 21, 2000, 2:30:35 PM (26 years ago)
Author:
sandervl
Message:

Many bugfixes

File:
1 edited

Legend:

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

    r2483 r2489  
    1 /* $Id: win32wbase.cpp,v 1.143 2000-01-20 16:48:56 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.144 2000-01-21 13:30:35 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    105105  OS2Hwnd          = 0;
    106106  OS2HwndFrame     = 0;
    107   hMenu            = 0;
    108107  hSysMenu         = 0;
    109108  Win32Hwnd        = 0;
     
    122121  win32wndproc     = 0;
    123122  hInstance        = 0;
    124   windowId         = 0xFFFFFFFF;        //default = -1
     123  dwIDMenu         = 0; //0xFFFFFFFF; //default -1
    125124  userData         = 0;
    126125  contextHelpId    = 0;
     
    10551054    //set new window rectangle
    10561055    setWindowRect(lpWndPos->x, lpWndPos->y, lpWndPos->x + lpWndPos->cx, lpWndPos->y + lpWndPos->cy);
    1057     if (getParent()) mapWin32Rect(getParent()->getOS2WindowHandle(),OSLIB_HWND_DESKTOP,&rectWindow);
    10581056    newWindowRect= rectWindow;
    10591057  }
     
    14141412            DWORD lParam;
    14151413
    1416             if (dwStyle & WS_CHILD)
    1417             {
    1418               lParam = MAKELONG(rectClient.left,rectClient.top);
    1419             } else
    1420             {
    1421               POINT point;
    1422 
    1423               point.x = rectClient.left;
    1424               point.y = rectClient.top;
    1425               if (getParent()) ClientToScreen(getParent()->getWindowHandle(),&point);
    1426 
    1427               lParam = MAKELONG(point.x, point.y);
    1428             }
    1429             SendInternalMessageA(WM_MOVE, 0, lParam);
     1414                if(getParent()) {//in parent coordinates
     1415                    POINT point;
     1416
     1417                    point.x = rectClient.left;
     1418                    point.y = rectClient.top;
     1419                    MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1);
     1420
     1421                    lParam = MAKELONG(point.x, point.y);
     1422                }
     1423                else {//in screen coordinates
     1424                    lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top);
     1425                }
     1426                SendInternalMessageA(WM_MOVE, 0, lParam);
    14301427        }
    14311428        if (!(wpos->flags & SWP_NOSIZE) && !(wpos->flags & SWP_NOCLIENTSIZE))
     
    27222719//******************************************************************************
    27232720//******************************************************************************
    2724 VOID Win32BaseWindow::updateWindowStyle(DWORD oldExStyle,DWORD oldStyle)
    2725 {
    2726   if(IsWindowDestroyed()) return;
    2727 
    2728   if ((dwStyle & 0xFFFF0000) != (oldStyle & 0xFFFF0000))
    2729   {
    2730         FrameUpdateClient(this);
    2731   }
    2732 }
    2733 //******************************************************************************
    2734 //******************************************************************************
    27352721LONG Win32BaseWindow::SetWindowLongA(int index, ULONG value, BOOL fUnicode)
    27362722{
     
    27512737                SendInternalMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss);
    27522738                setExStyle(ss.styleNew);
    2753                 updateWindowStyle(ss.styleOld,getStyle());
    27542739                SendInternalMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss);
    27552740                return ss.styleOld;
     
    27682753                SendInternalMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);
    27692754                setStyle(ss.styleNew);
    2770                 updateWindowStyle(dwExStyle,ss.styleOld);
    27712755                SendInternalMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss);
    27722756#ifdef DEBUG
     
    28782862void Win32BaseWindow::setWindowId(DWORD id)
    28792863{
    2880     windowId = id;
    2881     dprintf(("Set window ID to %x", id));
    2882     OSLibSetWindowID(OS2HwndFrame, id);
     2864    dwIDMenu = id;
    28832865}
    28842866//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.