Changeset 3603 for trunk/src/user32
- Timestamp:
- May 24, 2000, 9:30:08 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r3525 r3603 1 /* $Id: oslibmsgtranslate.cpp,v 1.3 0 2000-05-12 18:09:40sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.31 2000-05-24 19:30:05 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 189 189 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 190 190 191 #ifdef ODIN_HITTEST 192 //Send WM_HITTEST message 193 win32wnd->sendHitTest(MAKELONG(winMsg->pt.x,winMsg->pt.y)); 194 #endif 195 191 196 //if a window is disabled, it's parent receives the mouse messages 192 197 if(!win32wnd->IsWindowEnabled()) { … … 242 247 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 243 248 249 #ifdef ODIN_HITTEST 250 //Send WM_HITTEST message 251 win32wnd->sendHitTest(MAKELONG(winMsg->pt.x,winMsg->pt.y)); 252 #endif 244 253 //if a window is disabled, it's parent receives the mouse messages 245 254 if(!win32wnd->IsWindowEnabled()) { … … 288 297 winMsg->message = WINWM_NCACTIVATE; 289 298 winMsg->wParam = SHORT1FROMMP(os2Msg->mp1); 299 290 300 return TRUE; 291 301 } … … 417 427 BOOL fMinimized = FALSE; 418 428 419 if(WinQueryWindowULong(hwndActivate, OFFSET_WIN32PM_MAGIC) != WIN32PM_MAGIC) { 429 hwndActivate = Win32BaseWindow::OS2ToWin32Handle(hwndActivate); 430 if(hwndActivate == 0) { 420 431 //another (non-win32) application's window 421 432 //set to desktop window handle 422 hwndActivate = windowDesktop->getWindowHandle(); 423 } 424 else hwndActivate = Win32BaseWindow::OS2ToWin32Handle(hwndActivate); 433 hwndActivate = windowDesktop->getWindowHandle(); 434 } 425 435 426 436 if(WinQueryWindowULong(os2Msg->hwnd, QWL_STYLE) & WS_MINIMIZED) … … 483 493 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 484 494 495 #ifdef ODIN_HITTEST 496 //Send WM_HITTEST message 497 win32wnd->sendHitTest(MAKELONG(winMsg->pt.x,winMsg->pt.y)); 498 #endif 499 485 500 //if a window is disabled, it's parent receives the mouse messages 486 501 if(!win32wnd->IsWindowEnabled()) { … … 535 550 { 536 551 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 552 553 #ifdef ODIN_HITTEST 554 //Send WM_HITTEST message 555 win32wnd->sendHitTest(MAKELONG(winMsg->pt.x,winMsg->pt.y)); 556 #endif 537 557 538 558 //if a window is disabled, it's parent receives the mouse messages -
trunk/src/user32/pmframe.cpp
r3584 r3603 1 /* $Id: pmframe.cpp,v 1.5 4 2000-05-22 17:21:10 cbratschiExp $ */1 /* $Id: pmframe.cpp,v 1.55 2000-05-24 19:30:05 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 464 464 USHORT flags = WinQueryWindowUShort(hwnd,QWS_FLAGS); 465 465 466 dprintf(("PMFRAME: WM_ACTIVATE %x %x ", hwnd, mp2));466 dprintf(("PMFRAME: WM_ACTIVATE %x %x %x", hwnd, mp1, mp2)); 467 467 if(win32wnd->IsWindowCreated()) 468 468 win32wnd->DispatchMsgA(pWinMsg); -
trunk/src/user32/pmwindow.cpp
r3525 r3603 1 /* $Id: pmwindow.cpp,v 1.9 0 2000-05-12 18:09:41sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.91 2000-05-24 19:30:06 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 96 96 (PSZ)WIN32_STDCLASS, /* Window class name */ 97 97 (PFNWP)Win32WindowProc, /* Address of window procedure */ 98 #ifdef ODIN_HITTEST 99 0, 100 #else 98 101 CS_HITTEST, 102 #endif 99 103 NROF_WIN32WNDBYTES)) { 100 104 dprintf(("WinRegisterClass Win32BaseWindow failed")); … … 105 109 (PSZ)WIN32_STDCLASS2, /* Window class name */ 106 110 (PFNWP)Win32WindowProc, /* Address of window procedure */ 111 #ifdef ODIN_HITTEST 112 CS_SAVEBITS, 113 #else 107 114 CS_SAVEBITS | CS_HITTEST, 115 #endif 108 116 NROF_WIN32WNDBYTES)) { 109 117 dprintf(("WinRegisterClass Win32BaseWindow failed")); … … 118 126 WIN32_INNERFRAME, 119 127 FrameClassInfo.pfnWindowProc, 128 #ifdef ODIN_HITTEST 129 FrameClassInfo.flClassStyle, 130 #else 120 131 FrameClassInfo.flClassStyle | CS_HITTEST, 132 #endif 121 133 FrameClassInfo.cbWindowData)) { 122 134 dprintf (("WinRegisterClass Win32InnerFrame failed")); … … 263 275 case WM_ACTIVATE: 264 276 { 265 dprintf(("OS2: WM_ACTIVATE %x %x ", hwnd, mp2));277 dprintf(("OS2: WM_ACTIVATE %x %x %x", hwnd, mp1, mp2)); 266 278 267 279 if(win32wnd->IsWindowCreated()) -
trunk/src/user32/win32wbase.cpp
r3587 r3603 1 /* $Id: win32wbase.cpp,v 1.19 3 2000-05-22 19:05:58sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.194 2000-05-24 19:30:06 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1142 1142 //****************************************************************************** 1143 1143 //****************************************************************************** 1144 LONG Win32BaseWindow::sendHitTest(ULONG lParam) 1145 { 1146 lastHitTestVal = SendInternalMessageA(WM_NCHITTEST, 0, lParam); 1147 return lastHitTestVal; 1148 } 1149 //****************************************************************************** 1150 //****************************************************************************** 1144 1151 BOOL Win32BaseWindow::isMDIClient() 1145 1152 { … … 1387 1394 1388 1395 case WM_ACTIVATE: 1389 return 0; 1396 /* The default action in Windows is to set the keyboard focus to 1397 * the window, if it's being activated and not minimized */ 1398 if (LOWORD(wParam) != WA_INACTIVE) { 1399 if(!(getStyle() & WS_MINIMIZE)) 1400 SetFocus(getWindowHandle()); 1401 } 1402 return 0; 1390 1403 1391 1404 case WM_SETCURSOR: … … 2131 2144 Win32BaseWindow *window; 2132 2145 HWND hParent = 0; 2133 BOOL fShow = FALSE;2134 2146 2135 2147 if (fuFlags & … … 2245 2257 rc = OSLibWinSetMultWindowPos(&swp, 1); 2246 2258 2247 #ifdef DEBUG 2248 if(fShow) { 2249 dprintf(("Frame style 0x%08x, client style 0x%08x", OSLibQueryWindowStyle(OS2HwndFrame), OSLibQueryWindowStyle(OS2Hwnd))); 2250 } 2251 #endif 2252 if (rc == FALSE) 2259 if(rc == FALSE) 2253 2260 { 2254 2261 dprintf(("OSLibWinSetMultWindowPos failed! Error %x",OSLibWinGetLastError())); 2255 } 2262 return 0; 2263 } 2264 2256 2265 if((fuFlags & SWP_FRAMECHANGED) && (fuFlags & (SWP_NOMOVE | SWP_NOSIZE) == (SWP_NOMOVE | SWP_NOSIZE))) 2257 2266 { -
trunk/src/user32/win32wbase.h
r3493 r3603 1 /* $Id: win32wbase.h,v 1.9 4 2000-05-05 11:32:37 sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.95 2000-05-24 19:30:07 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 149 149 150 150 LONG getLastHitTestVal() { return lastHitTestVal; } 151 LONG sendHitTest(ULONG lParam); 151 152 152 153 DWORD getWindowContextHelpId() { return contextHelpId; }; -
trunk/src/user32/win32wmdichild.cpp
r2803 r3603 1 /* $Id: win32wmdichild.cpp,v 1.2 2 2000-02-16 14:28:24sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.23 2000-05-24 19:30:08 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 99 99 100 100 case WM_CHILDACTIVATE: 101 101 client->childActivate(this); 102 102 return 0; 103 103 … … 295 295 296 296 /* this menu is needed to set a check mark in MDI_ChildActivate */ 297 AppendMenuA(client->getMDIMenu(), MF_STRING ,wIDmenu, lpstrDef ); 297 if(client->getMDIMenu()) 298 AppendMenuA(client->getMDIMenu(), MF_STRING ,wIDmenu, lpstrDef ); 298 299 299 300 client->incNrActiveChildren(); … … 347 348 if(newchild && GetLastError() == 0) 348 349 { 350 /* All MDI child windows have the WS_EX_MDICHILD style */ 351 newchild->setExStyle(newchild->getExStyle() | WS_EX_MDICHILD); 352 349 353 newchild->menuModifyItem(); 350 354 … … 363 367 * the SWP_SHOWWINDOW command. 364 368 */ 365 newchild->SetWindowLongA(GWL_STYLE, newchild->getStyle() & ~WS_VISIBLE); 369 newchild->setStyle(newchild->getStyle() & ~WS_VISIBLE); 370 366 371 if(showflag){ 367 newchild->SetWindowPos(0, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE ); 372 dprintf(("newchild->SetWindowPos active window %x", GetActiveWindow())); 373 newchild->SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE ); 374 dprintf(("newchild->SetWindowPos active window %x", GetActiveWindow())); 368 375 369 376 /* Set maximized state here in case hwnd didn't receive WM_SIZE … … 382 389 else 383 390 /* needed, harmless ? */ 384 newchild->SetWindowPos( 0, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE );391 newchild->SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE ); 385 392 386 393 } … … 389 396 { 390 397 client->decNrActiveChildren(); 391 DeleteMenu(client->getMDIMenu(), wIDmenu,MF_BYCOMMAND); 398 if(client->getMDIMenu()) { 399 DeleteMenu(client->getMDIMenu(), wIDmenu,MF_BYCOMMAND); 400 } 392 401 393 402 maximizedChild = client->getMaximizedChild(); -
trunk/src/user32/win32wmdiclient.cpp
r3153 r3603 1 /* $Id: win32wmdiclient.cpp,v 1.2 6 2000-03-18 16:13:40 cbratschiExp $ */1 /* $Id: win32wmdiclient.cpp,v 1.27 2000-05-24 19:30:08 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 333 333 } 334 334 335 /* Don't activate if it is already active. Might happen 336 since ShowWindow DOES activate MDI children */ 337 if(activeChild == child) 338 { 339 return 0; 340 } 341 335 342 if( GetActiveWindow() == getParent()->getWindowHandle()) 336 343 isActiveFrameWnd = TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.