Changeset 3501 for trunk/src/user32
- Timestamp:
- May 9, 2000, 8:56:59 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/menu.cpp
r3225 r3501 1 /* $Id: menu.cpp,v 1.2 0 2000-03-24 19:20:33sandervl Exp $*/1 /* $Id: menu.cpp,v 1.21 2000-05-09 18:56:56 sandervl Exp $*/ 2 2 /* 3 3 * Menu functions … … 1599 1599 if (!pTopPopupWnd) 1600 1600 { 1601 DebugInt3(); 1601 1602 return FALSE; 1602 1603 } … … 1615 1616 if( !menu->hWnd ) 1616 1617 { 1618 DebugInt3(); 1617 1619 return FALSE; 1618 1620 } … … 2183 2185 { 2184 2186 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(menu->hWnd); 2185 if(win32wnd==NULL) 2186 DebugInt3(); 2187 if(win32wnd==NULL) { 2188 //SvL: This happens in Moraff's YourJongg 2.0, return here 2189 //TODO: Check if this is supposed to happen at all... 2190 return (HMENU)0; 2191 } 2187 2192 2188 2193 ht = win32wnd->HandleNCHitTest(pt); -
trunk/src/user32/user32.cpp
r3491 r3501 1 /* $Id: user32.cpp,v 1.8 0 2000-05-03 22:33:36sandervl Exp $ */1 /* $Id: user32.cpp,v 1.81 2000-05-09 18:56:57 sandervl Exp $ */ 2 2 3 3 /* … … 122 122 BOOL WIN32API InflateRect( PRECT lprc, int dx, int dy) 123 123 { 124 dprintf2(("USER32: InflateRect\n"));124 dprintf2(("USER32: InflateRect (%d,%d)(%d,%d) %d,%d", lprc->left, lprc->top, lprc->right, lprc->bottom, dx, dy)); 125 125 if (!lprc) 126 126 { … … 140 140 BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2) 141 141 { 142 dprintf2(("USER32: IntersectRect \n"));142 dprintf2(("USER32: IntersectRect (%d,%d)(%d,%d) (%d,%d)(%d,%d)", lprcSrc1->left, lprcSrc1->top, lprcSrc1->right, lprcSrc1->bottom, lprcSrc2->left, lprcSrc2->top, lprcSrc2->right, lprcSrc2->bottom)); 143 143 if (!lprcSrc1 || !lprcSrc2) 144 144 { 145 SetLastError(ERROR_INVALID_PARAMETER);146 return FALSE;145 SetLastError(ERROR_INVALID_PARAMETER); 146 return FALSE; 147 147 } 148 148 … … 182 182 BOOL WIN32API OffsetRect( PRECT lprc, int x, int y) 183 183 { 184 dprintf2(("USER32: OffsetRect\n"));184 dprintf2(("USER32: OffsetRect (%d,%d)(%d,%d) %d %d", lprc->left, lprc->top, lprc->right, lprc->bottom, x, y)); 185 185 if (!lprc) 186 186 { 187 SetLastError(ERROR_INVALID_PARAMETER);188 return FALSE;187 SetLastError(ERROR_INVALID_PARAMETER); 188 return FALSE; 189 189 } 190 190 … … 200 200 BOOL WIN32API PtInRect( const RECT *lprc, POINT pt) 201 201 { 202 dprintf2(("USER32: PtInRect\n"));202 dprintf2(("USER32: PtInRect (%d,%d)(%d,%d) (%d,%d)", lprc->left, lprc->top, lprc->right, lprc->bottom, pt.x, pt.y)); 203 203 if (!lprc) 204 204 { -
trunk/src/user32/win32wbase.cpp
r3493 r3501 1 /* $Id: win32wbase.cpp,v 1.18 4 2000-05-05 11:32:36sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.185 2000-05-09 18:56:58 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 797 797 ULONG Win32BaseWindow::MsgShow(BOOL fShow) 798 798 { 799 if(fNoSizeMsg ) {799 if(fNoSizeMsg || fDestroyWindowCalled) { 800 800 return 1; 801 801 } … … 865 865 ULONG rc, procidhwnd = -1, threadidhwnd = 0; 866 866 867 //SvL: Don't send WM_(NC)ACTIVATE messages when the window is being destroyed 868 if(fDestroyWindowCalled) { 869 return 0; 870 } 867 871 868 872 //According to SDK docs, if app returns FALSE & window is being deactivated, … … 910 914 ULONG Win32BaseWindow::MsgSetFocus(HWND hwnd) 911 915 { 916 //SvL: Don't send WM_(NC)ACTIVATE messages when the window is being destroyed 917 if(fDestroyWindowCalled) { 918 return 0; 919 } 920 912 921 return SendInternalMessageA(WM_SETFOCUS, hwnd, 0); 913 922 } … … 916 925 ULONG Win32BaseWindow::MsgKillFocus(HWND hwnd) 917 926 { 927 //SvL: Don't send WM_(NC)ACTIVATE messages when the window is being destroyed 928 if(fDestroyWindowCalled) { 929 return 0; 930 } 918 931 return SendInternalMessageA(WM_KILLFOCUS, hwnd, 0); 919 932 } … … 2024 2037 { 2025 2038 ULONG showstate = 0; 2026 HWND hWinAfter; 2039 HWND hWinAfter; 2040 BOOL rc; 2027 2041 2028 2042 dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow)); 2029 2043 2030 if (flags & WIN_NEED_SIZE) 2031 { 2032 /* should happen only in CreateWindowEx() */ 2033 int wParam = SIZE_RESTORED; 2034 2035 flags &= ~WIN_NEED_SIZE; 2036 if (dwStyle & WS_MAXIMIZE) 2037 wParam = SIZE_MAXIMIZED; 2038 else 2039 if (dwStyle & WS_MINIMIZE) 2040 wParam = SIZE_MINIMIZED; 2041 2042 SendInternalMessageA(WM_SIZE, wParam, 2043 MAKELONG(rectClient.right-rectClient.left, 2044 rectClient.bottom-rectClient.top)); 2045 SendInternalMessageA(WM_MOVE,0,MAKELONG(rectClient.left,rectClient.top)); 2044 if(getWindowHandle() == 0x68000002) { 2045 // DebugInt3(); 2046 2046 } 2047 2047 switch(nCmdShow) … … 2089 2089 else setStyle(getStyle() & ~WS_VISIBLE); 2090 2090 2091 BOOLrc = OSLibWinShowWindow(OS2HwndFrame, showstate);2091 rc = OSLibWinShowWindow(OS2HwndFrame, showstate); 2092 2092 2093 2093 SendInternalMessageA(WM_SHOWWINDOW, (showstate & SWPOS_SHOW) ? 1 : 0, 0); 2094 2095 if (flags & WIN_NEED_SIZE) 2096 { 2097 /* should happen only in CreateWindowEx() */ 2098 int wParam = SIZE_RESTORED; 2099 2100 flags &= ~WIN_NEED_SIZE; 2101 if (dwStyle & WS_MAXIMIZE) 2102 wParam = SIZE_MAXIMIZED; 2103 else 2104 if (dwStyle & WS_MINIMIZE) 2105 wParam = SIZE_MINIMIZED; 2106 2107 SendInternalMessageA(WM_SIZE, wParam, 2108 MAKELONG(rectClient.right-rectClient.left, 2109 rectClient.bottom-rectClient.top)); 2110 SendInternalMessageA(WM_MOVE,0,MAKELONG(rectClient.left,rectClient.top)); 2111 } 2094 2112 2095 2113 return rc; … … 2256 2274 BOOL Win32BaseWindow::DestroyWindow() 2257 2275 { 2276 HWND hwnd = getWindowHandle(); 2277 2278 dprintf(("DestroyWindow %x", hwnd)); 2279 2258 2280 /* Call hooks */ 2259 2281 if(HOOK_CallHooksA( WH_CBT, HCBT_DESTROYWND, getWindowHandle(), 0L)) … … 2274 2296 /* Notify the parent window only */ 2275 2297 getParent()->SendMessageA(WM_PARENTNOTIFY, MAKEWPARAM(WM_DESTROY, getWindowId()), (LPARAM)getWindowHandle()); 2276 if( !::IsWindow(getWindowHandle()) )2298 if(!::IsWindow(hwnd) ) 2277 2299 { 2278 2300 return TRUE; … … 2281 2303 else DebugInt3(); 2282 2304 } 2305 2306 /* Hide the window */ 2307 if(IsWindowVisible()) 2308 { 2309 SetWindowPos(0, 0, 0, 0, 0, SWP_HIDEWINDOW | 2310 SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE); 2311 if(!::IsWindow(hwnd)) 2312 { 2313 return TRUE; 2314 } 2315 } 2316 dprintf(("DestroyWindow %x -> HIDDEN", hwnd)); 2317 2283 2318 fDestroyWindowCalled = TRUE; 2284 2319 return OSLibWinDestroyWindow(OS2HwndFrame); -
trunk/src/user32/window.cpp
r3493 r3501 1 /* $Id: window.cpp,v 1.6 5 2000-05-05 11:32:38sandervl Exp $ */1 /* $Id: window.cpp,v 1.66 2000-05-09 18:56:59 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 317 317 return 0; 318 318 } 319 dprintf(("DestroyWindow %x", hwnd));320 319 return window->DestroyWindow(); 321 320 } … … 812 811 dprintf(("AdjustWindowRectEx %x %x %d (%d,%d)(%d,%d)\n", style, exStyle, menu, rect->left, rect->top, rect->right, rect->bottom)); 813 812 813 if(style == 0 && menu == FALSE && exStyle == 0) { 814 return TRUE; //nothing needs to be changed (VERIFIED in NT 4) 815 } 814 816 /* Correct the window style */ 815 817 if (!(style & (WS_POPUP | WS_CHILD))) /* Overlapped window */ … … 1026 1028 { 1027 1029 dprintf(("FlashWindow %x %d\n", hwnd, fFlash)); 1028 return OSLibWinFlashWindow(Win32BaseWindow::Win32ToOS2Handle(hwnd), fFlash); 1030 // return OSLibWinFlashWindow(Win32BaseWindow::Win32ToOS2Handle(hwnd), fFlash); 1031 return 1; 1029 1032 } 1030 1033 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.