- Timestamp:
- Feb 20, 2001, 4:40:23 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/dc.cpp
r5191 r5215 1 /* $Id: dc.cpp,v 1.9 0 2001-02-19 13:13:00sandervl Exp $ */1 /* $Id: dc.cpp,v 1.91 2001-02-20 15:40:22 sandervl Exp $ */ 2 2 3 3 /* … … 231 231 232 232 //testestest 233 if(wnd && wnd->getWindowWidth() && wnd->getWindowHeight()) { 234 RECTL recttmp, rectviewold; 235 236 rc = GpiQueryPageViewport(pHps->hps, &rectviewold); 237 if(rc == 0) { 238 dprintf(("WARNING: GpiQueryPageViewport returned FALSE!!")); 239 } 240 recttmp.xLeft = 0; 241 // recttmp.xRight = ((double)wnd->getWindowWidth() / xScale); 242 recttmp.xRight = ((double)GetScreenWidth() / xScale); 243 recttmp.yBottom = 0; 244 // recttmp.yTop = ((double)wnd->getWindowHeight() / yScale); 245 recttmp.yTop = ((double)GetScreenHeight() / yScale); 246 247 if(recttmp.yTop != rectviewold.yTop || 248 recttmp.xRight != rectviewold.xRight) 249 { 250 dprintf(("GpiSetPageViewport %x (%d,%d) %f %f", pHps->hps, recttmp.xRight, recttmp.yTop, xScale, yScale)); 251 rc = GpiSetPageViewport(pHps->hps, &recttmp); 252 if(rc == 0) { 253 dprintf(("WARNING: GpiSetPageViewport returned FALSE!!")); 254 } 255 } 233 if(wnd && wnd->getWindowWidth() && wnd->getWindowHeight()) 234 { 235 RECTL recttmp, rectviewold; 236 237 rc = GpiQueryPageViewport(pHps->hps, &rectviewold); 238 if(rc == 0) { 239 dprintf(("WARNING: GpiQueryPageViewport returned FALSE!!")); 240 } 241 recttmp.xLeft = 0; 242 recttmp.xRight = ((double)GetScreenWidth() / xScale); 243 recttmp.yBottom = 0; 244 recttmp.yTop = ((double)GetScreenHeight() / yScale); 245 246 if(recttmp.yTop != rectviewold.yTop || 247 recttmp.xRight != rectviewold.xRight) 248 { 249 if(pHps->viewportYExt > pHps->windowExt.cy) {//scaling up means we have to invert the y values 250 recttmp.yBottom = GetScreenHeight() - recttmp.yTop; 251 recttmp.yTop = GetScreenHeight(); 252 } 253 dprintf(("GpiSetPageViewport %x (%d,%d)(%d,%d) %f %f", pHps->hps, recttmp.xLeft, recttmp.yBottom, recttmp.xRight, recttmp.yTop, xScale, yScale)); 254 rc = GpiSetPageViewport(pHps->hps, &recttmp); 255 if(rc == 0) { 256 dprintf(("WARNING: GpiSetPageViewport returned FALSE!!")); 257 } 258 } 256 259 } 257 260 //testestest … … 1698 1701 } 1699 1702 //****************************************************************************** 1703 //SvL: Using WinScrollWindow to scroll child windows is better (smoother). 1700 1704 //****************************************************************************** 1701 1705 INT WIN32API ScrollWindowEx(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip, … … 1724 1728 1725 1729 if (scrollFlag & SW_INVALIDATE_W) scrollFlagsOS2 |= SW_INVALIDATERGN; 1730 if (scrollFlag & SW_SCROLLCHILDREN_W) scrollFlagsOS2 |= SW_SCROLLCHILDREN; 1726 1731 1727 1732 mapWin32ToOS2Rect(window->getWindowHeight(), window->getClientRectPtr(), (PRECTLOS2)&clientRect); … … 1758 1763 //CB: todo, scroll in several steps 1759 1764 // is time in ms? time <-> iteration count? 1760 }1761 1762 // Scroll children first1763 if (scrollFlag & SW_SCROLLCHILDREN_W)1764 {1765 HWND hwndChild;1766 RECT rectChild, rc;1767 1768 dprintf(("ScrollWindowEx: Scroll child windows"));1769 GetClientRect(hwnd, &rc);1770 if (pScroll) IntersectRect(&rc, &rc, pScroll);1771 1772 hwndChild = GetWindow(hwnd, GW_CHILD_W);1773 1774 while(hwndChild)1775 {1776 Win32BaseWindow *child;1777 1778 child = Win32BaseWindow::GetWindowFromHandle(hwndChild);1779 if(!child) {1780 dprintf(("ScrollWindowEx, child %x not found", hwnd));1781 return 0;1782 }1783 rectChild = *child->getWindowRect();1784 if(!pRectUpdate || IntersectRect(&rectChild, &rectChild, &rc))1785 {1786 dprintf(("ScrollWindowEx: Scroll child window %x", hwndChild));1787 SetWindowPos(hwndChild, 0, rectChild.left + dx,1788 rectChild.top + orgdy, 0, 0, SWP_NOZORDER_W |1789 SWP_NOSIZE_W | SWP_NOACTIVATE_W | SWP_NOREDRAW);1790 }1791 hwndChild = GetWindow(hwndChild, GW_HWNDNEXT_W);1792 }1793 dprintf(("***ScrollWindowEx: Scroll child windows DONE"));1794 1765 } 1795 1766 … … 1801 1772 { 1802 1773 return ERROR_W; 1774 } 1775 1776 //Notify children that they have moved (according to the SDK docs, 1777 //they only receive a WM_MOVE message) 1778 //(PM only does this for windows with CS_MOVENOTIFY class) 1779 //TODO: Verify this (no WM_WINDOWPOSCHANGING/ED?) 1780 if (scrollFlag & SW_SCROLLCHILDREN_W) 1781 { 1782 HWND hwndChild; 1783 RECT rectChild, rc; 1784 1785 dprintf(("ScrollWindowEx: Scroll child windows")); 1786 GetClientRect(hwnd, &rc); 1787 if (pScroll) IntersectRect(&rc, &rc, pScroll); 1788 1789 hwndChild = GetWindow(hwnd, GW_CHILD_W); 1790 1791 while(hwndChild) 1792 { 1793 Win32BaseWindow *child; 1794 1795 child = Win32BaseWindow::GetWindowFromHandle(hwndChild); 1796 if(!child) { 1797 dprintf(("ERROR: ScrollWindowEx, child %x not found", hwnd)); 1798 return 0; 1799 } 1800 rectChild = *child->getWindowRect(); 1801 if(!pRectUpdate || IntersectRect(&rectChild, &rectChild, &rc)) 1802 { 1803 dprintf(("ScrollWindowEx: Scroll child window %x", hwndChild)); 1804 child->ScrollWindow(dx, orgdy); 1805 } 1806 hwndChild = GetWindow(hwndChild, GW_HWNDNEXT_W); 1807 } 1808 dprintf(("***ScrollWindowEx: Scroll child windows DONE")); 1803 1809 } 1804 1810 -
trunk/src/user32/oslibwin.cpp
r5191 r5215 1 /* $Id: oslibwin.cpp,v 1.8 7 2001-02-19 13:13:02 sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.88 2001-02-20 15:40:22 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 821 821 } 822 822 //****************************************************************************** 823 //****************************************************************************** 823 //Returns the maximum position for a window 824 //Should only be used from toplevel windows 825 //****************************************************************************** 826 BOOL OSLibWinGetMaxPosition(HWND hwndOS2, RECT *rect) 827 { 828 SWP swp; 829 830 if(!WinGetMaxPosition(hwndOS2, &swp)) { 831 dprintf(("WARNING: WinGetMaxPosition %x returned FALSE", hwndOS2)); 832 return FALSE; 833 } 834 rect->left = swp.x; 835 rect->right = swp.x + swp.cx; 836 rect->top = ScreenHeight - (swp.y + swp.cy); 837 rect->bottom = ScreenHeight - swp.y; 838 return TRUE; 839 } 840 //****************************************************************************** 841 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r5191 r5215 1 /* $Id: oslibwin.h,v 1. 49 2001-02-19 13:13:04sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.50 2001-02-20 15:40:22 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 306 306 307 307 BOOL OSLibWinLockWindowUpdate(HWND hwnd); 308 BOOL OSLibWinGetMaxPosition(HWND hwndOS2, RECT *rect); 308 309 309 310 #endif //__OSLIBWIN_H__ -
trunk/src/user32/win32wbase.cpp
r5173 r5215 1 /* $Id: win32wbase.cpp,v 1.23 7 2001-02-18 17:59:05sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.238 2001-02-20 15:40:22 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 638 638 if ((cs->style & WS_THICKFRAME) || !(cs->style & (WS_POPUP | WS_CHILD))) 639 639 { 640 640 GetMinMaxInfo(&maxSize, &maxPos, &minTrack, &maxTrack); 641 641 if (maxSize.x < cs->cx) cs->cx = maxSize.x; 642 642 if (maxSize.y < cs->cy) cs->cy = maxSize.y; … … 2247 2247 2248 2248 if(!(swp & SWP_NOACTIVATE)) { 2249 OSLibWinSetActiveWindow(OS2Hwnd);2249 OSLibWinSetActiveWindow(OS2Hwnd); 2250 2250 } 2251 2251 … … 2441 2441 } 2442 2442 return (rc); 2443 } 2444 //****************************************************************************** 2445 //Called by ScrollWindowEx (dc.cpp) to notify child window that it has moved 2446 //****************************************************************************** 2447 BOOL Win32BaseWindow::ScrollWindow(int dx, int dy) 2448 { 2449 rectWindow.left += dx; 2450 rectWindow.right += dx; 2451 rectWindow.top += dy; 2452 rectWindow.bottom += dy; 2453 SendInternalMessageA(WM_MOVE, 0, MAKELONG(rectClient.left, rectClient.top)); 2454 return TRUE; 2443 2455 } 2444 2456 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r5173 r5215 1 /* $Id: win32wbase.h,v 1.10 6 2001-02-18 17:59:05sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.107 2001-02-20 15:40:23 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 222 222 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos); 223 223 BOOL GetWindowPlacement(LPWINDOWPLACEMENT winpos); 224 BOOL ScrollWindow(int dx, int dy); 224 225 BOOL DestroyWindow(); 225 226 HWND SetActiveWindow(); -
trunk/src/user32/win32wbasenonclient.cpp
r4597 r5215 1 /* $Id: win32wbasenonclient.cpp,v 1.2 6 2000-11-15 13:57:57sandervl Exp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.27 2001-02-20 15:40:23 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 229 229 pt.y = msg.pt.y; 230 230 ScreenToClient(getWindowHandle(), &pt); 231 232 231 pt.x += rectClient.left; 232 pt.y += rectClient.top; 233 233 msg.lParam = MAKELONG(pt.x,pt.y); 234 234 … … 264 264 Win32BaseWindow *topparent = GetTopParent(); 265 265 266 if (GetActiveWindow() != topparent->getWindowHandle())266 if((getStyle() & WS_CHILD) && !(getExStyle() & WS_EX_MDICHILD)) 267 267 { 268 //SvL: Calling topparent->SetActiveWindow() causes focus problems 269 // topparent->SetActiveWindow(); 270 OSLibWinSetFocus(topparent->getOS2WindowHandle()); 268 if (GetActiveWindow() != topparent->getWindowHandle()) 269 { 270 //SvL: Calling topparent->SetActiveWindow() causes focus problems 271 topparent->SetActiveWindow(); 272 //// OSLibWinSetFocus(topparent->getOS2WindowHandle()); 273 } 274 if (GetActiveWindow() == topparent->getWindowHandle()) 275 SendInternalMessageA(WM_SYSCOMMAND,SC_MOVE+HTCAPTION,lParam); 276 else dprintf(("ACtive window (%x) != toplevel wnd %x", OSLibWinQueryActiveWindow(), topparent->getWindowHandle())); 271 277 } 272 273 if (GetActiveWindow() == topparent->getWindowHandle()) 274 SendInternalMessageA(WM_SYSCOMMAND,SC_MOVE+HTCAPTION,lParam); 275 else dprintf(("ACtive window (%x) != toplevel wnd %x", OSLibWinQueryActiveWindow(), topparent->getWindowHandle())); 278 else { 279 SetActiveWindow(); 280 if (GetActiveWindow() == topparent->getWindowHandle()) 281 SendInternalMessageA(WM_SYSCOMMAND,SC_MOVE+HTCAPTION,lParam); 282 else dprintf(("ACtive window (%x) != wnd %x", OSLibWinQueryActiveWindow(), getWindowHandle())); 283 } 276 284 break; 277 285 } 278 286 279 287 case HTSYSMENU: 280 if(dwStyle & WS_SYSMENU )281 {282 SendInternalMessageA(WM_SYSCOMMAND,SC_MOUSEMENU+HTSYSMENU,lParam);283 }284 break;288 if(dwStyle & WS_SYSMENU ) 289 { 290 SendInternalMessageA(WM_SYSCOMMAND,SC_MOUSEMENU+HTSYSMENU,lParam); 291 } 292 break; 285 293 286 294 case HTMENU: 287 SendInternalMessageA(WM_SYSCOMMAND,SC_MOUSEMENU,lParam);288 break;295 SendInternalMessageA(WM_SYSCOMMAND,SC_MOUSEMENU,lParam); 296 break; 289 297 290 298 case HTHSCROLL: 291 SendInternalMessageA(WM_SYSCOMMAND,SC_HSCROLL+HTHSCROLL,lParam);292 break;299 SendInternalMessageA(WM_SYSCOMMAND,SC_HSCROLL+HTHSCROLL,lParam); 300 break; 293 301 294 302 case HTVSCROLL: 295 SendInternalMessageA(WM_SYSCOMMAND,SC_VSCROLL+HTVSCROLL,lParam);296 break;303 SendInternalMessageA(WM_SYSCOMMAND,SC_VSCROLL+HTVSCROLL,lParam); 304 break; 297 305 298 306 case HTMINBUTTON: 299 307 case HTMAXBUTTON: 300 308 case HTHELP: 301 TrackMinMaxHelpBox(wParam);302 break;309 TrackMinMaxHelpBox(wParam); 310 break; 303 311 304 312 case HTCLOSE: 305 TrackCloseButton(wParam);306 break;313 TrackCloseButton(wParam); 314 break; 307 315 308 316 case HTLEFT: … … 664 672 } 665 673 //****************************************************************************** 674 //Returns position of system menu in screen coordinates 666 675 //****************************************************************************** 667 676 BOOL Win32BaseWindow::GetSysPopupPos(RECT* rect) 668 677 { 669 if(hSysMenu) 670 { 671 if(dwStyle & WS_MINIMIZE ) 672 *rect = rectWindow; 673 else 674 { 675 GetInsideRect(rect ); 676 OffsetRect( rect, rectWindow.left, rectWindow.top); 677 rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1; 678 rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1; 679 } 680 return TRUE; 681 } 682 return FALSE; 678 if(hSysMenu) 679 { 680 if(dwStyle & WS_MINIMIZE) { 681 *rect = rectWindow; 682 } 683 else 684 { 685 GetInsideRect(rect ); 686 OffsetRect( rect, rectWindow.left, rectWindow.top); 687 if(getStyle() & WS_CHILD) 688 ClientToScreen(getParent()->getWindowHandle(), (POINT *)rect); 689 690 rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1; 691 rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1; 692 } 693 return TRUE; 694 } 695 return FALSE; 683 696 } 684 697 //****************************************************************************** … … 1340 1353 if (wParam == SC_PUTMARK) 1341 1354 WriteLog(("Mark requested by user\n")); 1342 1343 if (wParam == SC_DEBUGINT3) 1355 else 1356 if (wParam == SC_DEBUGINT3) 1344 1357 DebugInt3(); 1345 1358 #endif -
trunk/src/user32/win32wbasepos.cpp
r4945 r5215 1 /* $Id: win32wbasepos.cpp,v 1.1 8 2001-01-14 17:15:47sandervl Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.19 2001-02-20 15:40:23 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 39 39 #include <win\hook.h> 40 40 41 #define DBG_LOCALLOG 41 #define DBG_LOCALLOG DBG_win32wbasepos 42 42 #include "dbglocal.h" 43 43 … … 54 54 55 55 /* Compute default values */ 56 57 MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN); 58 MinMax.ptMaxSize.y = GetSystemMetrics(SM_CYSCREEN); 59 MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK); 60 MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK); 61 MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN); 62 MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYSCREEN); 56 MinMax.ptMaxPosition.x = 0; 57 MinMax.ptMaxPosition.y = 0; 58 59 if(!(getStyle() & (WS_POPUP | WS_CHILD))) { 60 RECT rect; 61 OSLibWinGetMaxPosition(getOS2WindowHandle(), &rect); 62 MinMax.ptMaxPosition.x = rect.left; 63 MinMax.ptMaxPosition.y = rect.top; 64 65 MinMax.ptMaxSize.x = rect.right - rect.left; 66 MinMax.ptMaxSize.y = rect.bottom - rect.top; 67 MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK); 68 MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK); 69 MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN); 70 MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYSCREEN); 71 } 72 else { 73 MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN); 74 MinMax.ptMaxSize.y = GetSystemMetrics(SM_CYSCREEN); 75 MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK); 76 MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK); 77 MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN); 78 MinMax.ptMaxTrackSize.y = GetSystemMetrics(SM_CYSCREEN); 79 } 63 80 64 81 if (HAS_DLGFRAME( dwStyle, dwExStyle )) … … 75 92 yinc += GetSystemMetrics(SM_CYFRAME); 76 93 } 77 94 //SvL: Wine has no 'else', but I'm seeing different behaviour in NT 78 95 // and it doesn't make much sense either as a window can have 79 96 // only one kind of border (see drawing code) 80 97 else 81 98 if (dwStyle & WS_BORDER) 82 99 { … … 95 112 { 96 113 #endif 97 MinMax.ptMaxPosition.x = -xinc;98 MinMax.ptMaxPosition.y = -yinc;114 MinMax.ptMaxPosition.x -= xinc; 115 MinMax.ptMaxPosition.y -= yinc; 99 116 // } 100 117 … … 138 155 if((winpos->flags & (SWP_FRAMECHANGED | SWP_NOSIZE)) != SWP_NOSIZE ) 139 156 { 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 157 params.rgrc[0] = *newWindowRect; 158 if(calcValidRect) 159 { 160 winposCopy = *winpos; 161 params.rgrc[1] = *oldWindowRect; 162 params.rgrc[2] = *oldClientRect; 163 //client rectangel must be in parent coordinates 164 OffsetRect(¶ms.rgrc[2], rectWindow.left, rectWindow.top); 165 166 params.lppos = &winposCopy; 167 } 168 result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, (LPARAM)¶ms ); 169 170 /* If the application send back garbage, ignore it */ 171 if(params.rgrc[0].left <= params.rgrc[0].right && params.rgrc[0].top <= params.rgrc[0].bottom) 172 { 173 *newClientRect = params.rgrc[0]; 174 //client rectangle now in parent coordinates; convert to 'frame' coordinates 175 OffsetRect(newClientRect, -rectWindow.left, -rectWindow.top); 176 } 160 177 161 178 /* FIXME: WVR_ALIGNxxx */ … … 169 186 } 170 187 else 171 if(!(winpos->flags & SWP_NOMOVE) && 188 if(!(winpos->flags & SWP_NOMOVE) && 172 189 (newClientRect->left != rectClient.left || newClientRect->top != rectClient.top)) { 173 190 winpos->flags &= ~SWP_NOCLIENTMOVE; … … 206 223 POINT size; 207 224 208 size.x = rectWindow.left; 225 size.x = rectWindow.left; 209 226 size.y = rectWindow.top; 210 227 211 228 if(IsRectEmpty(&windowpos.rcNormalPosition)) { 212 229 CopyRect(&windowpos.rcNormalPosition, &rectWindow); 213 230 } 214 231 if(!HOOK_CallHooksA(WH_CBT, HCBT_MINMAX, getWindowHandle(), cmd)) 215 232 { 216 217 218 219 220 221 222 223 224 225 226 227 233 if(getStyle() & WS_MINIMIZE ) 234 { 235 if(!SendInternalMessageA(WM_QUERYOPEN, 0, 0L)) 236 return (SWP_NOSIZE | SWP_NOMOVE); 237 } 238 switch( cmd ) 239 { 240 case SW_MINIMIZE: 241 if( getStyle() & WS_MAXIMIZE) 242 { 243 setFlags(getFlags() | WIN_RESTORE_MAX); 244 setStyle(getStyle() & ~WS_MAXIMIZE); 228 245 } 229 else 230 231 232 233 234 235 236 237 246 else setFlags(getFlags() & ~WIN_RESTORE_MAX); 247 248 setStyle(getStyle() | WS_MINIMIZE); 249 250 SetRect(lpRect, windowpos.ptMinPosition.x, windowpos.ptMinPosition.y, 251 GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON) ); 252 break; 253 254 case SW_MAXIMIZE: 238 255 GetMinMaxInfo(&size, &windowpos.ptMaxPosition, NULL, NULL ); 239 256 240 241 242 243 257 if(getStyle() & WS_MINIMIZE ) 258 { 259 setStyle(getStyle() & ~WS_MINIMIZE); 260 } 244 261 setStyle(getStyle() | WS_MAXIMIZE); 245 262 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 } 264 else 265 if( !(getStyle() & WS_MAXIMIZE) ) 266 267 elsesetStyle(getStyle() & ~WS_MAXIMIZE);268 269 270 271 272 lpRect->right -= lpRect->left; 273 274 275 276 } 263 SetRect(lpRect, windowpos.ptMaxPosition.x, windowpos.ptMaxPosition.y, 264 size.x, size.y ); 265 break; 266 267 case SW_RESTORE: 268 if(getStyle() & WS_MINIMIZE) 269 { 270 setStyle(getStyle() & ~WS_MINIMIZE); 271 272 if( getFlags() & WIN_RESTORE_MAX) 273 { 274 /* Restore to maximized position */ 275 GetMinMaxInfo(&size, &windowpos.ptMaxPosition, NULL, NULL); 276 setStyle(getStyle() | WS_MAXIMIZE); 277 SetRect(lpRect, windowpos.ptMaxPosition.x, windowpos.ptMaxPosition.y, size.x, size.y); 278 break; 279 } 280 } 281 else 282 if( !(getStyle() & WS_MAXIMIZE) ) 283 return 0; 284 else setStyle(getStyle() & ~WS_MAXIMIZE); 285 286 /* Restore to normal position */ 287 288 *lpRect = windowpos.rcNormalPosition; 289 lpRect->right -= lpRect->left; 290 lpRect->bottom -= lpRect->top; 291 break; 292 } 293 } 277 294 else swpFlags |= SWP_NOSIZE | SWP_NOMOVE; 278 295
Note:
See TracChangeset
for help on using the changeset viewer.