Ignore:
Timestamp:
Jan 11, 2004, 1:04:44 PM (22 years ago)
Author:
sandervl
Message:

Update

File:
1 edited

Legend:

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

    r10316 r10379  
    1 /* $Id: dc.cpp,v 1.122 2003-11-12 14:10:18 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.123 2004-01-11 12:03:13 sandervl Exp $ */
    22
    33/*
     
    618618//******************************************************************************
    619619//******************************************************************************
    620 void releaseOwnDC (HDC hps)
    621 {
    622    pDCData pHps = (pDCData)GpiQueryDCData ((HPS)hps);
    623 
    624    dprintf2(("releaseOwnDC %x", hps));
    625 
    626    if (pHps) {
    627       if (pHps->hrgnHDC)
    628          GpiDestroyRegion (pHps->hps, pHps->hrgnHDC);
    629 
    630       GpiSetBitmap (pHps->hps, NULL);
    631       O32_DeleteObject (pHps->nullBitmapHandle);
    632       GpiDestroyPS(pHps->hps);
    633 
    634       if (pHps->hdc)
    635          DevCloseDC(pHps->hdc);
    636    }
    637 }
    638 //******************************************************************************
    639 //******************************************************************************
    640620HDC WIN32API BeginPaint (HWND hWnd, PPAINTSTRUCT_W lpps)
    641621{
     
    685665            }
    686666            hpsPaint = hPS_ownDC;
     667            STATS_GetDCEx(hwnd, hpsPaint, 0, 0);
    687668        }
    688669    }
     
    865846
    866847    HWND hwndDC = WindowFromDC(hdc);
    867 
     848 
     849    //hwndDC can be zero if the window has already been destroyed
    868850    if(hwndDC != hwnd) {
    869851        dprintf(("WARNING: ReleaseDC: wrong window handle specified %x -> %x", hwnd, hwndDC));
     
    908890    }
    909891
     892    STATS_ReleaseDC(hwnd, hdc);
    910893    if(isOwnDC) {
    911894        rc = TRUE;
     
    914897        UnselectGDIObjects(hdc);
    915898        rc = O32_ReleaseDC (0, hdc);
    916         STATS_ReleaseDC(hwnd, hdc);
    917899    }
    918900
     
    11171099    RELEASE_WNDOBJ(wnd);
    11181100
    1119 
    11201101    STATS_GetDCEx(hwnd, pHps->hps, hrgn, flags);
    11211102    return (HDC)pHps->hps;
     
    16201601    if (lComplexity == RGN_ERROR)
    16211602    {
    1622         RELEASE_WNDOBJ(window);
    1623         return ERROR_W;
     1603        goto fail;
    16241604    }
    16251605
     
    16461626                if(!child) {
    16471627                    dprintf(("ERROR: ScrollWindowEx, child %x not found", hwnd));
    1648                     RELEASE_WNDOBJ(window);
    1649                     return 0;
     1628                    goto fail;
    16501629                }
    16511630                rectChild = *child->getWindowRect();
     
    17121691    RELEASE_WNDOBJ(window);
    17131692    return (regionType);
     1693
     1694fail:
     1695    if(hrgn)      GpiDestroyRegion(hpsScreen, hrgn);
     1696    if(hpsScreen) WinReleasePS(hpsScreen);
     1697    RELEASE_WNDOBJ(window);
     1698    return ERROR_W;
    17141699}
    17151700//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.