Changeset 5935 for trunk/src/user32/win32wmdichild.cpp
- Timestamp:
- Jun 9, 2001, 4:50:26 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wmdichild.cpp
r4573 r5935 1 /* $Id: win32wmdichild.cpp,v 1.2 5 2000-11-09 18:15:22sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.26 2001-06-09 14:50:23 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 46 46 //****************************************************************************** 47 47 Win32MDIChildWindow::Win32MDIChildWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL fUnicode) 48 : Win32BaseWindow( OBJTYPE_WINDOW)48 : Win32BaseWindow() 49 49 { 50 50 isUnicode = fUnicode; … … 73 73 DefWindowProcA(Msg, wParam, lParam); 74 74 menuModifyItem(); 75 if( client->getMaximizedChild() == this)75 if( client->getMaximizedChild() == getWindowHandle() ) 76 76 client->updateFrameText(MDI_REPAINTFRAME, NULL); 77 77 return 0; … … 93 93 94 94 case WM_SETFOCUS: 95 if(client->getActiveChild() != this)95 if(client->getActiveChild() != getWindowHandle() ) 96 96 client->childActivate(this); 97 97 break; … … 108 108 { 109 109 case SC_MOVE: 110 if( client->getMaximizedChild() == this)110 if( client->getMaximizedChild() == getWindowHandle()) 111 111 { 112 112 return 0; … … 119 119 120 120 case SC_MAXIMIZE: 121 if( client->getMaximizedChild() == this)121 if( client->getMaximizedChild() == getWindowHandle()) 122 122 { 123 123 return client->SendMessageA(Msg, wParam, lParam); … … 145 145 case WM_SIZE: 146 146 /* do not change */ 147 if( client->getActiveChild() == this&& wParam != SIZE_MAXIMIZED )147 if( client->getActiveChild() == getWindowHandle() && wParam != SIZE_MAXIMIZED ) 148 148 { 149 149 client->setMaximizedChild(NULL); 150 client->restoreFrameMenu( this);150 client->restoreFrameMenu(getWindowHandle()); 151 151 client->updateFrameText(MDI_REPAINTFRAME, NULL ); 152 152 } … … 154 154 if( wParam == SIZE_MAXIMIZED ) 155 155 { 156 Win32MDIChildWindow *maxChild = client->getMaximizedChild();157 158 if( maxChild == this) break;156 HWND maxChild = client->getMaximizedChild(); 157 158 if( maxChild == getWindowHandle() ) break; 159 159 160 160 if( maxChild) 161 161 { 162 maxChild->SendMessageA(WM_SETREDRAW, FALSE, 0L );162 ::SendMessageA(maxChild, WM_SETREDRAW, FALSE, 0L ); 163 163 client->restoreFrameMenu(maxChild); 164 maxChild->ShowWindow(SW_SHOWNOACTIVATE);165 166 maxChild->SendMessageA(WM_SETREDRAW, TRUE, 0L );164 ::ShowWindow(maxChild, SW_SHOWNOACTIVATE); 165 166 ::SendMessageA(maxChild, WM_SETREDRAW, TRUE, 0L ); 167 167 } 168 168 169 client->setMaximizedChild( this);170 client->setActiveChild( this);171 172 client->augmentFrameMenu( this);169 client->setMaximizedChild(getWindowHandle()); 170 client->setActiveChild(getWindowHandle()); 171 172 client->augmentFrameMenu(getWindowHandle()); 173 173 174 174 client->updateFrameText(MDI_REPAINTFRAME, NULL ); … … 221 221 DefWindowProcW(Msg, wParam, lParam); 222 222 menuModifyItem(); 223 if( client->getMaximizedChild() == this)223 if( client->getMaximizedChild() == getWindowHandle() ) 224 224 client->updateFrameText(MDI_REPAINTFRAME, NULL ); 225 225 … … 257 257 WORD wIDmenu = client->getFirstChildId() + client->getNrOfChildren(); 258 258 char lpstrDef[]="junk!"; 259 Win32MDIChildWindow *maximizedChild, *newchild; 259 Win32MDIChildWindow *newchild; 260 HWND maximizedChild; 260 261 CREATESTRUCTA createstruct; 261 262 ATOM classAtom; … … 287 288 maximizedChild = client->getMaximizedChild(); 288 289 289 maximizedChild->ShowWindow(SW_SHOWNOACTIVATE );290 ::ShowWindow(maximizedChild, SW_SHOWNOACTIVATE ); 290 291 291 292 if( style & WS_MAXIMIZE ) … … 379 380 if((newchild->getStyle() & WS_MAXIMIZE) && !client->getMaximizedChild() ) 380 381 { 381 client->setMaximizedChild(newchild );382 383 client->augmentFrameMenu(newchild );382 client->setMaximizedChild(newchild->getWindowHandle()); 383 384 client->augmentFrameMenu(newchild->getWindowHandle()); 384 385 385 386 client->updateFrameText(MDI_REPAINTFRAME, NULL ); … … 400 401 401 402 maximizedChild = client->getMaximizedChild(); 402 if( maximizedChild && maximizedChild->IsWindow() )403 maximizedChild->ShowWindow(SW_SHOWMAXIMIZED);403 if( ::IsWindow(maximizedChild) ) 404 ::ShowWindow(maximizedChild, SW_SHOWMAXIMIZED); 404 405 405 406 dprintf(("MDI child creation failed!!")); … … 456 457 * sequence and in the menu child list */ 457 458 459 lock(); 458 460 for( index = id+1; index <= client->getNrOfChildren() + 459 461 client->getFirstChildId(); index++ ) 460 462 { 461 Win32MDIChildWindow *tmpWnd = client->getChildByID(index);463 Win32MDIChildWindow *tmpWnd = (Win32MDIChildWindow *)GetWindowFromHandle(client->getChildByID(index)); 462 464 if( !tmpWnd ) 463 465 { 464 dprintf(("no window for id=%i\n",index));465 continue;466 dprintf(("no window for id=%i\n",index)); 467 continue; 466 468 } 467 469 … … 473 475 lstrcpynA(buffer + n, tmpWnd->getWindowNameA(), sizeof(buffer) - n ); 474 476 477 RELEASE_WNDOBJ(tmpWnd); 478 479 unlock(); 475 480 /* change menu */ 476 481 ModifyMenuA(client->getMDIMenu(), index ,MF_BYCOMMAND | MF_STRING, 477 482 index - 1 , buffer ); 478 } 483 lock(); 484 } 485 unlock(); 479 486 return TRUE; 480 487 }
Note:
See TracChangeset
for help on using the changeset viewer.