Changeset 1322
- Timestamp:
- Oct 16, 1999, 4:51:43 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/user32/win32wbase.cpp ¶
r1314 r1322 1 /* $Id: win32wbase.cpp,v 1.4 6 1999-10-16 10:28:31sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.47 1999-10-16 14:51:42 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1163 1163 //****************************************************************************** 1164 1164 //****************************************************************************** 1165 BOOL Win32BaseWindow::isMDIChild() 1166 { 1167 return FALSE; 1168 } 1169 //****************************************************************************** 1170 //TODO: Not complete 1171 //****************************************************************************** 1165 1172 BOOL Win32BaseWindow::isFrameWindow() 1166 1173 { 1167 if((getParent() == NULL || getParent() == windowDesktop) && ((dwStyle & WS_CAPTION) == WS_CAPTION)) 1174 // if(isMDIChild() || IsDialog() || (getParent() == NULL || getParent() == windowDesktop) && ((dwStyle & WS_CAPTION) == WS_CAPTION)) 1175 if((dwStyle & WS_CAPTION) == WS_CAPTION || dwStyle & (WS_VSCROLL|WS_HSCROLL)) 1168 1176 return TRUE; 1169 1177 -
TabularUnified trunk/src/user32/win32wbase.h ¶
r1314 r1322 1 /* $Id: win32wbase.h,v 1.2 4 1999-10-16 10:28:31sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.25 1999-10-16 14:51:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 108 108 BOOL isFrameWindow(); 109 109 virtual BOOL isMDIClient(); 110 virtual BOOL isMDIChild(); 110 111 111 112 Win32BaseWindow *getParent() { return (Win32BaseWindow *)ChildWindow::GetParent(); }; -
TabularUnified trunk/src/user32/win32wbasepos.cpp ¶
r1265 r1322 1 /* $Id: win32wbasepos.cpp,v 1. 1 1999-10-13 14:24:49sandervl Exp $ */1 /* $Id: win32wbasepos.cpp,v 1.2 1999-10-16 14:51:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (nonclient/position methods) … … 277 277 if (getStyle() & CS_HREDRAW) result |= WVR_HREDRAW; 278 278 279 if(!isFrameWindow()) return result;280 281 279 //TODO: Wine calculates new size of client area even when window is iconic (client edges) 282 280 if(!(getStyle() & (WS_MINIMIZE | WS_ICONIC))) … … 295 293 } 296 294 #if 0 297 //TODO: Docs say app should return 0 when fCalcValidRects == 0 ,Wine doesn't do this295 //TODO: Docs say app should return 0 when fCalcValidRects == 0; Wine doesn't do this 298 296 if(wParam == 0) //fCalcValidRects 299 297 return 0; -
TabularUnified trunk/src/user32/win32wmdichild.cpp ¶
r1256 r1322 1 /* $Id: win32wmdichild.cpp,v 1. 4 1999-10-12 14:47:24sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.5 1999-10-16 14:51:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 45 45 //****************************************************************************** 46 46 Win32MDIChildWindow::Win32MDIChildWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode) 47 : Win32BaseWindow(lpCreateStructA, classAtom, isUnicode)47 : Win32BaseWindow(lpCreateStructA, classAtom, isUnicode) 48 48 { 49 49 } … … 80 80 } 81 81 else return 1; 82 } 83 //****************************************************************************** 84 //****************************************************************************** 85 BOOL Win32MDIChildWindow::isMDIChild() 86 { 87 return TRUE; 82 88 } 83 89 //****************************************************************************** … … 277 283 HWND Win32MDIChildWindow::createChild(Win32MDIClientWindow *client, LPMDICREATESTRUCTA cs ) 278 284 { 279 POINT pos[2]; 280 DWORD style = cs->style | (WS_CHILD | WS_CLIPSIBLINGS); 281 HWND hwnd; 282 WORD wIDmenu = client->getFirstChildId() + client->getNrOfChildren(); 283 char lpstrDef[]="junk!"; 284 Win32MDIChildWindow *maximizedChild, *newchild; 285 POINT pos[2]; 286 DWORD style = cs->style | (WS_CHILD | WS_CLIPSIBLINGS); 287 WORD wIDmenu = client->getFirstChildId() + client->getNrOfChildren(); 288 char lpstrDef[]="junk!"; 289 Win32MDIChildWindow *maximizedChild, *newchild; 290 CREATESTRUCTA createstruct; 291 ATOM classAtom; 292 char tmpClassA[20] = ""; 293 WCHAR tmpClassW[20]; 294 LPSTR className; 285 295 286 296 dprintf(("Win32MDIChildWindow::createChild %i,%i - dim %i,%i, style %08x\n", … … 326 336 } 327 337 328 if(!client->IsUnicode()) 329 hwnd = ::CreateWindowA(cs->szClass, cs->szTitle, style, 330 cs->x, cs->y, cs->cx, cs->cy, client->getWindowHandle(), 331 (HMENU)wIDmenu, cs->hOwner, cs ); 332 else 333 hwnd = ::CreateWindowW((LPWSTR)cs->szClass, (LPWSTR)cs->szTitle, style, 334 cs->x, cs->y, cs->cx, cs->cy, client->getWindowHandle(), 335 (HMENU)wIDmenu, cs->hOwner, cs ); 336 337 /* MDI windows are WS_CHILD so they won't be activated by CreateWindow */ 338 newchild = (Win32MDIChildWindow *)GetWindowFromHandle(hwnd); 339 if (hwnd && newchild) 338 createstruct.lpszName = cs->szTitle; 339 createstruct.style = style; 340 createstruct.dwExStyle = 0; 341 createstruct.x = cs->x; 342 createstruct.y = cs->y; 343 createstruct.cx = cs->cx; 344 createstruct.cy = cs->cy; 345 createstruct.hInstance = cs->hOwner; 346 createstruct.hMenu = wIDmenu; 347 createstruct.hwndParent= client->getWindowHandle(); 348 createstruct.lpCreateParams = (LPVOID)cs; 349 350 className = (LPSTR)cs->szClass; 351 /* Find the class atom */ 352 if (!(classAtom = (client->IsUnicode() ? GlobalFindAtomW((LPWSTR)cs->szClass) : 353 GlobalFindAtomA(cs->szClass)))) 354 { 355 if (!HIWORD(cs->szClass)) 356 { 357 if(!client->IsUnicode()) 358 { 359 sprintf(tmpClassA,"#%d", (int) className); 360 classAtom = GlobalFindAtomA(tmpClassA); 361 className = tmpClassA; 362 } 363 else 364 { 365 sprintf(tmpClassA,"#%d", (int) className); 366 AsciiToUnicode(tmpClassA, tmpClassW); 367 classAtom = GlobalFindAtomW(tmpClassW); 368 className = (LPSTR)tmpClassW; 369 } 370 } 371 if (!classAtom) 372 { 373 if (!HIWORD(cs->szClass)) { 374 dprintf(("createChild: bad class name %04x\n", LOWORD(className))); 375 } 376 else dprintf(("createChild: bad class name '%s'\n", tmpClassA )); 377 378 SetLastError(ERROR_INVALID_PARAMETER); 379 return 0; 380 } 381 } 382 createstruct.lpszClass = className; 383 384 newchild = new Win32MDIChildWindow(&createstruct, classAtom, client->IsUnicode()); 385 386 if(newchild && GetLastError() == 0) 340 387 { 341 388 newchild->menuModifyItem(); … … 368 415 client->setMaximizedChild(newchild); 369 416 #if 0 370 MDI_AugmentFrameMenu( ci, w->parent, hwnd);417 MDI_AugmentFrameMenu( ci, w->parent, newchild->getWindowHandle() ); 371 418 #endif 372 419 client->updateFrameText(MDI_REPAINTFRAME, NULL ); … … 387 434 if( maximizedChild && maximizedChild->IsWindow() ) 388 435 maximizedChild->ShowWindow(SW_SHOWMAXIMIZED); 389 } 390 return hwnd; 436 437 dprintf(("MDI child creation failed!!")); 438 return 0; 439 } 440 return newchild->getWindowHandle(); 391 441 } 392 442 /********************************************************************** -
TabularUnified trunk/src/user32/win32wmdichild.h ¶
r1093 r1322 1 /* $Id: win32wmdichild.h,v 1. 2 1999-09-29 09:16:32sandervl Exp $ */1 /* $Id: win32wmdichild.h,v 1.3 1999-10-16 14:51:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 32 32 BOOL menuDeleteItem(); 33 33 34 virtual BOOL isMDIChild(); 35 34 36 LRESULT DefMDIChildProcA(UINT Msg, WPARAM wParam, LPARAM lParam); 35 37 LRESULT DefMDIChildProcW(UINT Msg, WPARAM wParam, LPARAM lParam);
Note:
See TracChangeset
for help on using the changeset viewer.