Changeset 10379 for trunk/src/user32/dc.cpp
- Timestamp:
- Jan 11, 2004, 1:04:44 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r10316 r10379 1 /* $Id: dc.cpp,v 1.12 2 2003-11-12 14:10:18sandervl Exp $ */1 /* $Id: dc.cpp,v 1.123 2004-01-11 12:03:13 sandervl Exp $ */ 2 2 3 3 /* … … 618 618 //****************************************************************************** 619 619 //****************************************************************************** 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 //******************************************************************************640 620 HDC WIN32API BeginPaint (HWND hWnd, PPAINTSTRUCT_W lpps) 641 621 { … … 685 665 } 686 666 hpsPaint = hPS_ownDC; 667 STATS_GetDCEx(hwnd, hpsPaint, 0, 0); 687 668 } 688 669 } … … 865 846 866 847 HWND hwndDC = WindowFromDC(hdc); 867 848 849 //hwndDC can be zero if the window has already been destroyed 868 850 if(hwndDC != hwnd) { 869 851 dprintf(("WARNING: ReleaseDC: wrong window handle specified %x -> %x", hwnd, hwndDC)); … … 908 890 } 909 891 892 STATS_ReleaseDC(hwnd, hdc); 910 893 if(isOwnDC) { 911 894 rc = TRUE; … … 914 897 UnselectGDIObjects(hdc); 915 898 rc = O32_ReleaseDC (0, hdc); 916 STATS_ReleaseDC(hwnd, hdc);917 899 } 918 900 … … 1117 1099 RELEASE_WNDOBJ(wnd); 1118 1100 1119 1120 1101 STATS_GetDCEx(hwnd, pHps->hps, hrgn, flags); 1121 1102 return (HDC)pHps->hps; … … 1620 1601 if (lComplexity == RGN_ERROR) 1621 1602 { 1622 RELEASE_WNDOBJ(window); 1623 return ERROR_W; 1603 goto fail; 1624 1604 } 1625 1605 … … 1646 1626 if(!child) { 1647 1627 dprintf(("ERROR: ScrollWindowEx, child %x not found", hwnd)); 1648 RELEASE_WNDOBJ(window); 1649 return 0; 1628 goto fail; 1650 1629 } 1651 1630 rectChild = *child->getWindowRect(); … … 1712 1691 RELEASE_WNDOBJ(window); 1713 1692 return (regionType); 1693 1694 fail: 1695 if(hrgn) GpiDestroyRegion(hpsScreen, hrgn); 1696 if(hpsScreen) WinReleasePS(hpsScreen); 1697 RELEASE_WNDOBJ(window); 1698 return ERROR_W; 1714 1699 } 1715 1700 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.