Changeset 2569 for trunk/src


Ignore:
Timestamp:
Jan 29, 2000, 9:46:52 PM (26 years ago)
Author:
sandervl
Message:

SetWindowPos, UpdateWindow & WS_VISIBLE fixes/changes

Location:
trunk/src/user32
Files:
3 edited

Legend:

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

    r2560 r2569  
    1 /* $Id: dc.cpp,v 1.39 2000-01-29 14:23:32 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.40 2000-01-29 20:46:52 sandervl Exp $ */
    22
    33/*
     
    847847BOOL WIN32API UpdateWindow (HWND hwnd)
    848848{
    849    if (!hwnd)
    850        return FALSE;
    851 
    852    Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
    853 
    854    dprintf (("User32: UpdateWindow hwnd %x -> wnd %x", hwnd, wnd));
    855 
    856 #if 0
    857    if (WinQueryUpdateRect (wnd->getOS2WindowHandle(), NULL))
    858        sendEraseBkgnd (wnd);
    859 #endif
    860 
    861    WinUpdateWindow(wnd->getOS2FrameWindowHandle());
     849  Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);
     850
     851   if(!wnd) {
     852        O32_SetLastError(ERROR_INVALID_WINDOW_HANDLE);
     853        return FALSE;
     854   }
     855
     856   dprintf (("User32: UpdateWindow hwnd %x", hwnd));
     857
     858   //SvL: Should update client window, not the frame
     859   WinUpdateWindow(wnd->getOS2WindowHandle());
    862860
    863861   return (TRUE);
  • trunk/src/user32/oslibwin.cpp

    r2521 r2569  
    1 /* $Id: oslibwin.cpp,v 1.64 2000-01-26 18:02:34 cbratschi Exp $ */
     1/* $Id: oslibwin.cpp,v 1.65 2000-01-29 20:46:52 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    6868  ULONG dwClientStyle = 0;
    6969  ULONG dwFrameStyle = 0;
    70 #if 1
    7170
    7271  BOOL TopLevel = hwndParent == HWND_DESKTOP;
     
    10099  dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
    101100  return 0;
    102 #else
    103         dwClientStyle = dwWinStyle & ~(WS_TABSTOP | WS_GROUP);
    104 
    105         dwFrameStyle |= FCF_NOBYTEALIGN;
    106         if ((hwndParent == HWND_DESKTOP) && (dwFrameStyle & FCF_TITLEBAR))
    107                 dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER;
    108 
    109         dwWinStyle   &= ~WS_CLIPCHILDREN;
    110 
    111         *hwndFrame = WinCreateStdWindow(hwndParent, dwWinStyle,
    112                                        &dwFrameStyle, WIN32_STDCLASS,
    113                                        "", dwClientStyle, 0, id, &hwndClient);
    114         if(*hwndFrame) {
    115                 if(pszName) {
    116                         WinSetWindowText(*hwndFrame, pszName);
    117                 }
    118                 return hwndClient;
    119         }
    120         dprintf(("OSLibWinCreateWindow: (FRAME) WinCreateStdWindow failed (%x)", WinGetLastError(GetThreadHAB())));
    121         return 0;
    122 #endif
    123101}
    124102//******************************************************************************
     
    135113        *OSWinStyle |= WS_MINIMIZED;
    136114//Done explicitely in CreateWindowExA
    137 #if 1
     115#if 0
    138116  if(dwStyle & WS_VISIBLE_W)
    139117        *OSWinStyle |= WS_VISIBLE;
  • trunk/src/user32/win32wbase.cpp

    r2552 r2569  
    1 /* $Id: win32wbase.cpp,v 1.148 2000-01-28 22:26:00 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.149 2000-01-29 20:46:52 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    20492049   Win32BaseWindow *window;
    20502050   HWND hParent = 0;
     2051   BOOL fShow = FALSE, fHide = FALSE;
    20512052
    20522053    if (fuFlags &
     
    20862087#endif
    20872088
     2089    if(fuFlags & SWP_SHOWWINDOW) {
     2090        fShow = TRUE;
     2091        fuFlags &= ~SWP_SHOWWINDOW;
     2092    }
     2093    else
     2094    if(fuFlags & SWP_HIDEWINDOW) {
     2095        fHide = TRUE;
     2096        fuFlags &= ~SWP_HIDEWINDOW;
     2097    }
    20882098    wpos.flags            = fuFlags;
    20892099    wpos.cy               = cy;
     
    21322142    dprintf (("WinSetWindowPos %x %x (%d,%d)(%d,%d) %x", swp.hwnd, swp.hwndInsertBehind, swp.x, swp.y, swp.cx, swp.cy, swp.fl));
    21332143
     2144    //SvL: For some reason WinSetMultWindowPos doesn't work for showing windows when they are hidden..
     2145    if(fHide) {
     2146        ShowWindow(SW_HIDE);
     2147    }
    21342148    rc = OSLibWinSetMultWindowPos(&swp, 1);
     2149    if(fShow) {
     2150        ShowWindow(SW_SHOWNA);
     2151    }
    21352152
    21362153    if (rc == FALSE)
Note: See TracChangeset for help on using the changeset viewer.