- Timestamp:
- May 2, 2000, 10:50:53 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 8 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 -
trunk/src/user32/loadres.cpp
r3462 r3482 1 /* $Id: loadres.cpp,v 1.2 7 2000-04-29 18:28:36sandervl Exp $ */1 /* $Id: loadres.cpp,v 1.28 2000-05-02 20:50:48 sandervl Exp $ */ 2 2 3 3 /* … … 468 468 hbitmap = CreateDIBitmap(hdc, &fix_info->bmiHeader, CBM_INIT, 469 469 bits, fix_info, DIB_RGB_COLORS ); 470 if(hbitmap == 0) { 471 dprintf(("LoadBitmapA: CreateDIBitmap failed!!")); 472 } 470 473 // } 471 474 } -
trunk/src/user32/oslibmsgtranslate.cpp
r3388 r3482 1 /* $Id: oslibmsgtranslate.cpp,v 1.2 8 2000-04-15 15:11:13sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.29 2000-05-02 20:50:49 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 194 194 win32wnd = win32wnd->getParent(); 195 195 } 196 dprintf(("Rerouting mouse messages to parent %x of disabled window %x", win32wnd->getWindowHandle(), winMsg->hwnd)); 196 197 fWasDisabled = TRUE; 197 198 } … … 246 247 win32wnd = win32wnd->getParent(); 247 248 } 249 dprintf(("Rerouting mouse messages to parent %x of disabled window %x", win32wnd->getWindowHandle(), winMsg->hwnd)); 248 250 fWasDisabled = TRUE; 249 251 } … … 636 638 637 639 dprintf(("PM: WM_CHAR: %x %x %d %x", SHORT1FROMMP(os2Msg->mp2), SHORT2FROMMP(os2Msg->mp2), repeatCount, scanCode)); 638 dprintf(("PM: WM_CHAR: %x", flags));640 dprintf(("PM: WM_CHAR: hwnd %x flags %x", win32wnd->getWindowHandle(), flags)); 639 641 640 642 // vitali add begin -
trunk/src/user32/uitools.cpp
r2873 r3482 1 /* $Id: uitools.cpp,v 1.2 6 2000-02-23 17:05:17 cbratschiExp $ */1 /* $Id: uitools.cpp,v 1.27 2000-05-02 20:50:49 sandervl Exp $ */ 2 2 /* 3 3 * User Interface Functions … … 1614 1614 //****************************************************************************** 1615 1615 //****************************************************************************** 1616 BOOL WIN32API DrawFocusRect( HDC arg1, const RECT * arg2) 1617 { 1618 #ifdef DEBUG 1619 WriteLog("USER32: DrawFocusRect\n"); 1620 #endif 1621 return O32_DrawFocusRect(arg1, arg2); 1616 BOOL WIN32API DrawFocusRect( HDC hdc, const RECT *lpRect) 1617 { 1618 BOOL rc; 1619 1620 rc = O32_DrawFocusRect(hdc, lpRect); 1621 dprintf(("USER32: DrawFocusRect %x %x returned %d", hdc, lpRect, rc)); 1622 return rc; 1622 1623 } 1623 1624 //****************************************************************************** … … 1631 1632 COLORREF oldFg,oldBg; 1632 1633 1633 #ifdef DEBUG 1634 WriteLog("USER32: DrawIcon\n"); 1635 #endif 1634 dprintf(("USER32: DrawIcon\n")); 1636 1635 1637 1636 if (!hDC || !hIcon) … … 1681 1680 INT oldStretchMode; 1682 1681 1683 #ifdef DEBUG 1684 WriteLog("USER32: DrawIconEx\n"); 1685 #endif 1682 dprintf(("USER32: DrawIconEx")); 1686 1683 1687 1684 //CB: istepIfAniCur, DI_COMPAT ignored -
trunk/src/user32/user32.cpp
r3337 r3482 1 /* $Id: user32.cpp,v 1.7 7 2000-04-07 10:01:16sandervl Exp $ */1 /* $Id: user32.cpp,v 1.78 2000-05-02 20:50:50 sandervl Exp $ */ 2 2 3 3 /* … … 151 151 (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom)) 152 152 { 153 SetLastError(ERROR_INVALID_PARAMETER); 154 if (lprcDst) SetRectEmpty(lprcDst); 155 return FALSE; 153 //SvL: NT doesn't set the last error here 154 //SetLastError(ERROR_INVALID_PARAMETER); 155 if (lprcDst) SetRectEmpty(lprcDst); 156 return FALSE; 156 157 } 157 158 if (lprcDst) … … 1222 1223 SHORT WIN32API GetKeyState( int nVirtKey) 1223 1224 { 1224 //SvL: Hehe. 32 MB logfile for Opera after a minute.1225 1225 dprintf2(("USER32: GetKeyState %d\n", nVirtKey)); 1226 1226 return O32_GetKeyState(nVirtKey); -
trunk/src/user32/win32dlg.cpp
r3060 r3482 1 /* $Id: win32dlg.cpp,v 1.4 7 2000-03-09 19:05:39sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.48 2000-05-02 20:50:51 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 76 76 if (dlgInfo.style & DS_SETFONT) 77 77 { 78 /* The font height must be negative as it is a point size */ 79 /* (see CreateFont() documentation in the Windows SDK). */ 80 hUserFont = CreateFontW(-(dlgInfo.pointSize*3)/2, 0, 0, 0, 78 /* The font height must be negative as it is a point size */ 79 /* and must be converted to pixels first */ 80 /* (see CreateFont() documentation in the Windows SDK). */ 81 HDC dc = GetDC(0); 82 int pixels = dlgInfo.pointSize * GetDeviceCaps(dc , LOGPIXELSY)/72; 83 ReleaseDC(0, dc); 84 85 hUserFont = CreateFontW(-pixels, 0, 0, 0, 81 86 dlgInfo.weight, dlgInfo.italic, FALSE, 82 87 FALSE, DEFAULT_CHARSET, 0, 0, PROOF_QUALITY, … … 125 130 INT dX, dY; 126 131 127 if( !(dlgInfo.style & DS_ABSALIGN) )132 if( !(dlgInfo.style & DS_ABSALIGN) && owner) 128 133 ClientToScreen(owner, (POINT *)&rect ); 129 134 … … 232 237 hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE ); 233 238 234 if (SendInternalMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param)) 235 SetFocus(hwndFocus); 239 HWND hwndPreInitFocus = GetFocus(); 240 if(SendInternalMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param)) { 241 SetFocus(hwndFocus); 242 } 243 else 244 { 245 /* If the dlgproc has returned FALSE (indicating handling of keyboard focus) 246 but the focus has not changed, set the focus where we expect it. */ 247 if ( (getStyle() & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) ) 248 SetFocus( hwndFocus ); 249 } 236 250 237 251 if (dlgInfo.style & WS_VISIBLE && !(getStyle() & WS_VISIBLE)) -
trunk/src/user32/win32wbase.cpp
r3462 r3482 1 /* $Id: win32wbase.cpp,v 1.18 1 2000-04-29 18:28:39sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.182 2000-05-02 20:50:51 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2113 2113 return TRUE; 2114 2114 } 2115 #if 0 2116 /* Fix redundant flags */ 2117 if(getStyle() & WS_VISIBLE) { 2118 fuFlags &= ~SWP_SHOWWINDOW; 2119 } 2120 else 2121 { 2122 if (!(fuFlags & SWP_SHOWWINDOW)) 2123 fuFlags |= SWP_NOREDRAW; 2124 fuFlags &= ~SWP_HIDEWINDOW; 2125 } 2126 2127 if(cx < 0) cx = 0; 2128 if(cy < 0) cy = 0; 2129 2130 if((rectWindow.right - rectWindow.left == cx) && (rectWindow.bottom - rectWindow.top == cy)) { 2131 fuFlags |= SWP_NOSIZE; /* Already the right size */ 2132 } 2133 2134 if((rectWindow.left == x) && (rectWindow.top == y)) { 2135 fuFlags |= SWP_NOMOVE; /* Already the right position */ 2136 } 2137 2138 if(getWindowHandle() == GetActiveWindow()) { 2139 fuFlags |= SWP_NOACTIVATE; /* Already active */ 2140 } 2141 else 2142 if((getStyle() & (WS_POPUP | WS_CHILD)) != WS_CHILD ) 2143 { 2144 if(!(fuFlags & SWP_NOACTIVATE)) /* Bring to the top when activating */ 2145 { 2146 fuFlags &= ~SWP_NOZORDER; 2147 hwndInsertAfter = HWND_TOP; 2148 } 2149 } 2150 #endif 2151 2115 2152 WINDOWPOS wpos; 2116 2153 SWP swp, swpOld; … … 2196 2233 FrameUpdateClient(this); 2197 2234 } 2198 2199 2235 return (rc); 2200 2236 } -
trunk/src/user32/window.cpp
r3462 r3482 1 /* $Id: window.cpp,v 1.6 2 2000-04-29 18:28:41sandervl Exp $ */1 /* $Id: window.cpp,v 1.63 2000-05-02 20:50:53 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 465 465 return 0; 466 466 } 467 dprintf(("ShowWindow %x", hwnd));468 467 return window->ShowWindow(nCmdShow); 469 468 } … … 868 867 OSLIBPOINT point; 869 868 869 SetLastError(0); 870 870 if(lpPoints == NULL || cPoints == 0) { 871 871 SetLastError(ERROR_INVALID_PARAMETER); … … 902 902 if (!mapWin32Point(wndfrom,wndto,&point)) 903 903 { 904 SetLastError(ERROR_INVALID_WINDOW_HANDLE);905 return 0;904 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 905 return 0; 906 906 } 907 907 … … 919 919 //****************************************************************************** 920 920 //****************************************************************************** 921 BOOL WIN32API ScreenToClient 921 BOOL WIN32API ScreenToClient(HWND hwnd, LPPOINT pt) 922 922 { 923 923 Win32BaseWindow *wnd; … … 929 929 if (!wnd) { 930 930 dprintf(("warning: ScreenToClient: window %x not found!", hwnd)); 931 return (TRUE); 932 } 931 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 932 return FALSE; 933 } 934 SetLastError(0); 933 935 #ifdef DEBUG 934 936 POINT tmp = *pt;
Note:
See TracChangeset
for help on using the changeset viewer.