Changeset 3482 for trunk/src/user32/dc.cpp
- Timestamp:
- May 2, 2000, 10:50:53 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r3341 r3482 1 /* $Id: dc.cpp,v 1.5 4 2000-04-07 12:55:15sandervl Exp $ */1 /* $Id: dc.cpp,v 1.55 2000-05-02 20:50:48 sandervl Exp $ */ 2 2 3 3 /* … … 803 803 } 804 804 //****************************************************************************** 805 //****************************************************************************** 806 int WIN32API ReleaseDC (HWND hwnd, HDC hdc) 807 { 808 BOOL isOwnDC = FALSE; 809 int rc; 810 811 if (hwnd) 812 { 813 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd); 814 if(wnd == NULL) { 815 dprintf(("ERROR: ReleaseDC %x %x failed", hwnd, hdc)); 816 return 0; 817 } 818 //SvL: Hack for memory.exe (doesn't get repainted properly otherwise) 819 // isOwnDC = wnd->isOwnDC() && wnd->getOwnDC(); 820 isOwnDC = wnd->isOwnDC() && (wnd->getOwnDC() == hdc); 821 } 822 if (isOwnDC) 823 rc = TRUE; 824 else 825 rc = O32_ReleaseDC (0, hdc); 826 827 dprintf(("ReleaseDC %x %x", hwnd, hdc)); 828 return (rc); 829 } 830 //****************************************************************************** 805 831 // This implementation of GetDCEx supports 806 832 // DCX_WINDOW … … 961 987 /* Something went wrong; clean up 962 988 */ 989 dprintf(("ERROR: GetDCEx hwnd %x (%x %x) FAILED!", hwnd, hrgn, flags)); 990 DebugInt3(); 963 991 if (pHps) 964 992 { … … 993 1021 if (!hwnd) hwnd = GetDesktopWindow(); 994 1022 return GetDCEx (hwnd, NULL, DCX_USESTYLE_W | DCX_WINDOW_W); 995 }996 //******************************************************************************997 //******************************************************************************998 int WIN32API ReleaseDC (HWND hwnd, HDC hdc)999 {1000 BOOL isOwnDC = FALSE;1001 int rc;1002 1003 if (hwnd)1004 {1005 Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle (hwnd);1006 if(wnd == NULL) {1007 dprintf(("ERROR: ReleaseDC %x %x failed", hwnd, hdc));1008 return 0;1009 }1010 //SvL: Hack for memory.exe (doesn't get repainted properly otherwise)1011 // isOwnDC = wnd->isOwnDC() && wnd->getOwnDC();1012 isOwnDC = wnd->isOwnDC() && (wnd->getOwnDC() == hdc);1013 }1014 if (isOwnDC)1015 rc = TRUE;1016 else1017 rc = O32_ReleaseDC (0, hdc);1018 1019 dprintf(("ReleaseDC %x %x", hwnd, hdc));1020 return (rc);1021 1023 } 1022 1024 //****************************************************************************** … … 1040 1042 else dprintf(("RedrawWindow %x %x %x %x", hwnd, pRect, hrgn, redraw)); 1041 1043 1042 if (redraw & (RDW_FRAME_W | RDW_NOFRAME_W))1043 {1044 SetLastError(ERROR_NOT_SUPPORTED_W);1045 return FALSE;1046 }1047 1048 1044 if (hwnd == NULLHANDLE) 1049 1045 { … … 1076 1072 return FALSE; 1077 1073 } 1078 hwnd = wnd->getOS2WindowHandle(); 1074 //TODO: If frame, exclude client window from update 1075 if(redraw & RDW_FRAME_W) { 1076 hwnd = wnd->getOS2FrameWindowHandle(); 1077 } 1078 else hwnd = wnd->getOS2WindowHandle(); 1079 1079 1080 } 1080 1081
Note:
See TracChangeset
for help on using the changeset viewer.