Changeset 5236 for trunk/src/user32/win32wbasepos.cpp
- Timestamp:
- Feb 21, 2001, 9:51:07 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbasepos.cpp
r5215 r5236 1 /* $Id: win32wbasepos.cpp,v 1. 19 2001-02-20 15:40:23sandervl Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.20 2001-02-21 20:51:07 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 227 227 228 228 if(IsRectEmpty(&windowpos.rcNormalPosition)) { 229 CopyRect(&windowpos.rcNormalPosition, &rectWindow);229 CopyRect(&windowpos.rcNormalPosition, &rectWindow); 230 230 } 231 231 if(!HOOK_CallHooksA(WH_CBT, HCBT_MINMAX, getWindowHandle(), cmd)) 232 232 { 233 if(getStyle() & WS_MINIMIZE )234 {235 if(!SendInternalMessageA(WM_QUERYOPEN, 0, 0L))236 return (SWP_NOSIZE | SWP_NOMOVE);237 }238 switch( cmd )239 {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 240 case SW_MINIMIZE: 241 if( getStyle() & WS_MAXIMIZE)242 {243 setFlags(getFlags() | WIN_RESTORE_MAX);244 setStyle(getStyle() & ~WS_MAXIMIZE);245 246 elsesetFlags(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;241 if( getStyle() & WS_MAXIMIZE) 242 { 243 setFlags(getFlags() | WIN_RESTORE_MAX); 244 setStyle(getStyle() & ~WS_MAXIMIZE); 245 } 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 253 254 254 case SW_MAXIMIZE: 255 256 257 if(getStyle() & WS_MINIMIZE )258 {259 setStyle(getStyle() & ~WS_MINIMIZE);260 }261 262 263 SetRect(lpRect, windowpos.ptMaxPosition.x, windowpos.ptMaxPosition.y,264 size.x, size.y );265 break;255 GetMinMaxInfo(&size, &windowpos.ptMaxPosition, NULL, NULL ); 256 257 if(getStyle() & WS_MINIMIZE ) 258 { 259 setStyle(getStyle() & ~WS_MINIMIZE); 260 } 261 setStyle(getStyle() | WS_MAXIMIZE); 262 263 SetRect(lpRect, windowpos.ptMaxPosition.x, windowpos.ptMaxPosition.y, 264 size.x, size.y ); 265 break; 266 266 267 267 case SW_RESTORE: 268 if(getStyle() & WS_MINIMIZE)269 {268 if(getStyle() & WS_MINIMIZE) 269 { 270 270 setStyle(getStyle() & ~WS_MINIMIZE); 271 271 272 272 if( getFlags() & WIN_RESTORE_MAX) 273 273 { 274 /* Restore to maximized position */275 276 setStyle(getStyle() | WS_MAXIMIZE);277 SetRect(lpRect, windowpos.ptMaxPosition.x, windowpos.ptMaxPosition.y, size.x, size.y);278 break;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 279 } 280 }281 else280 } 281 else 282 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 } 283 return 0; 284 else setStyle(getStyle() & ~WS_MAXIMIZE); 285 286 /* Restore to normal position */ 287 *lpRect = windowpos.rcNormalPosition; 288 lpRect->right -= lpRect->left; 289 lpRect->bottom -= lpRect->top; 290 break; 291 } 293 292 } 294 293 else swpFlags |= SWP_NOSIZE | SWP_NOMOVE;
Note:
See TracChangeset
for help on using the changeset viewer.