- Timestamp:
- Mar 31, 2000, 4:42:49 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r3127 r3284 1 /* $Id: oslibmsgtranslate.cpp,v 1.2 5 2000-03-16 19:19:09 sandervlExp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.26 2000-03-31 14:42:47 cbratschi Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 138 138 POSTMSG_PACKET *packet; 139 139 THDB *thdb = (THDB *)pThdb; 140 ULONG hittest;141 140 int i; 142 141 … … 165 164 switch (os2Msg->msg) 166 165 { 166 case WM_HITTEST: 167 winMsg->message = WINWM_NCHITTEST; 168 winMsg->wParam = 0; 169 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 170 171 return TRUE; 172 167 173 case WM_BUTTON1DOWN: 168 174 case WM_BUTTON1UP: … … 176 182 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 177 183 178 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);179 180 184 if (IsNCMouseMsg(win32wnd)) { 181 185 winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN); 182 winMsg->wParam = hittest;186 winMsg->wParam = win32wnd->getLastHitTestVal(); 183 187 winMsg->lParam = MAKELONG(winMsg->pt.x, winMsg->pt.y); //screen coordinates 184 188 } … … 197 201 if(DInputMouseHandler(win32wnd->getWindowHandle(), winMsg->message, winMsg->pt.x, winMsg->pt.y)) { 198 202 goto dummymessage; //dinput swallowed message 199 203 } 200 204 } 201 205 … … 216 220 { 217 221 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 218 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);219 222 220 223 if (IsNCMouseMsg(win32wnd)) 221 224 { 222 225 winMsg->message = WINWM_NCMOUSEMOVE; 223 winMsg->wParam = (WPARAM) hittest;226 winMsg->wParam = (WPARAM)win32wnd->getLastHitTestVal(); 224 227 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 225 228 } … … 422 425 //Mouse messages (OS/2 Window coordinates -> Win32 coordinates relative to screen 423 426 //************************************************************************** 427 case WM_HITTEST: 428 winMsg->message = WINWM_NCHITTEST; 429 winMsg->wParam = 0; 430 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 431 432 return TRUE; 433 424 434 case WM_BUTTON1DOWN: 425 435 case WM_BUTTON1UP: … … 432 442 case WM_BUTTON3DBLCLK: 433 443 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 434 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);435 444 436 445 if(IsNCMouseMsg(win32wnd)) { 437 446 winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN); 438 winMsg->wParam = hittest;447 winMsg->wParam = win32wnd->getLastHitTestVal(); 439 448 winMsg->lParam = MAKELONG(winMsg->pt.x, winMsg->pt.y); //screen coordinates 440 449 } … … 472 481 { 473 482 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 474 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y);475 483 476 484 if(IsNCMouseMsg(win32wnd)) 477 485 { 478 486 winMsg->message = WINWM_NCMOUSEMOVE; 479 winMsg->wParam = (WPARAM) hittest;487 winMsg->wParam = (WPARAM)win32wnd->getLastHitTestVal(); 480 488 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 481 489 } … … 609 617 winMsg->lParam |= (scanCode & 0x0FF) << 16; // bit 16-23, scancode 610 618 611 619 //TODO: Is this correct and complete? (how does PM differentiate between 612 620 // i.e numeric pad pgdn & 'normal' pgdn??) 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 621 //Check if it's an extended key 622 switch(virtualKey) { 623 case VK_RETURN_W: 624 //The enter key on the numeric keypad is an extended key 625 if(SHORT2FROMMP(os2Msg->mp2) != VK_NEWLINE) 626 break; 627 //no break 628 case VK_LEFT_W: 629 case VK_RIGHT_W: 630 case VK_DOWN_W: 631 case VK_UP_W: 632 case VK_PRIOR_W: 633 case VK_NEXT_W: 634 case VK_END_W: 635 case VK_DIVIDE_W: 636 case VK_DELETE_W: 637 case VK_HOME_W: 638 case VK_INSERT_W: 639 case VK_RCONTROL_W: 640 case VK_RMENU_W: //is this the right alt??? 641 winMsg->lParam = winMsg->lParam | (1<<24); 642 break; 643 } 636 644 637 645 if(!(SHORT1FROMMP(os2Msg->mp1) & KC_ALT)) … … 676 684 if(DInputKeyBoardHandler(winMsg)) { 677 685 goto dummymessage; //dinput swallowed message 678 686 } 679 687 } 680 688 break; … … 771 779 default: 772 780 dummymessage: 773 774 775 781 winMsg->message = 0; 782 winMsg->wParam = 0; 783 winMsg->lParam = 0; 776 784 return FALSE; 777 785 } -
trunk/src/user32/pmframe.cpp
r3101 r3284 1 /* $Id: pmframe.cpp,v 1.4 5 2000-03-13 13:10:47 sandervlExp $ */1 /* $Id: pmframe.cpp,v 1.46 2000-03-31 14:42:47 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 164 164 RestoreOS2TIB(); 165 165 return (MRESULT)TRUE; 166 } 167 168 case WM_HITTEST: 169 { 170 if (win32wnd->IsWindowCreated()) 171 { 172 MRESULT rc; 173 174 rc = (MRESULT)win32wnd->MsgHitTest(pWinMsg); 175 RestoreOS2TIB(); 176 return rc; 177 } 178 return (MRESULT)HT_NORMAL; 166 179 } 167 180 -
trunk/src/user32/pmwindow.cpp
r3101 r3284 1 /* $Id: pmwindow.cpp,v 1.8 7 2000-03-13 13:10:47 sandervlExp $ */1 /* $Id: pmwindow.cpp,v 1.88 2000-03-31 14:42:48 cbratschi 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 0,98 CS_HITTEST, 99 99 NROF_WIN32WNDBYTES)) { 100 100 dprintf(("WinRegisterClass Win32BaseWindow failed")); … … 105 105 (PSZ)WIN32_STDCLASS2, /* Window class name */ 106 106 (PFNWP)Win32WindowProc, /* Address of window procedure */ 107 CS_SAVEBITS ,107 CS_SAVEBITS | CS_HITTEST, 108 108 NROF_WIN32WNDBYTES)) { 109 109 dprintf(("WinRegisterClass Win32BaseWindow failed")); … … 118 118 WIN32_INNERFRAME, 119 119 FrameClassInfo.pfnWindowProc, 120 FrameClassInfo.flClassStyle ,120 FrameClassInfo.flClassStyle | CS_HITTEST, 121 121 FrameClassInfo.cbWindowData)) { 122 122 dprintf (("WinRegisterClass Win32InnerFrame failed")); … … 337 337 //Mouse messages (OS/2 Window coordinates -> Win32 coordinates relative to screen 338 338 //************************************************************************** 339 case WM_HITTEST: 340 rc = win32wnd->MsgHitTest(pWinMsg); 341 break; 342 343 339 344 case WM_BUTTON1DOWN: 340 345 case WM_BUTTON1UP: -
trunk/src/user32/win32wbase.cpp
r3251 r3284 1 /* $Id: win32wbase.cpp,v 1.17 5 2000-03-27 21:41:47 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.176 2000-03-31 14:42:48 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 257 257 if (cs->hwndParent == GetDesktopWindow() && (!(cs->style & WS_CHILD) || (cs->style & WS_POPUP))) 258 258 { 259 259 cs->hwndParent = 0; 260 260 } 261 261 } … … 830 830 //****************************************************************************** 831 831 //****************************************************************************** 832 ULONG Win32BaseWindow::MsgHitTest(ULONG x, ULONG y) 833 { 834 lastHitTestVal = SendInternalMessageA(WM_NCHITTEST, 0, MAKELONG((USHORT)x, (USHORT)y)); 835 dprintf2(("MsgHitTest (%d,%d) (%d,%d) (%d,%d) returned %x", x, y, rectWindow.left, rectWindow.right, rectWindow.top, rectWindow.bottom, lastHitTestVal)); 836 return lastHitTestVal; 832 ULONG Win32BaseWindow::MsgHitTest(MSG *msg) 833 { 834 lastHitTestVal = DispatchMessageA(msg); 835 836 dprintf2(("MsgHitTest (%d,%d) (%d,%d) (%d,%d) returned %x", LOWORD(msg->lParam), HIWORD(msg->lParam), rectWindow.left, rectWindow.right, rectWindow.top, rectWindow.bottom, lastHitTestVal)); 837 838 if (lastHitTestVal == HTTRANSPARENT) 839 return HTOS_TRANSPARENT; 840 else 841 return HTOS_NORMAL; 837 842 } 838 843 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r3153 r3284 1 /* $Id: win32wbase.h,v 1.9 0 2000-03-18 16:13:39 cbratschi Exp $ */1 /* $Id: win32wbase.h,v 1.91 2000-03-31 14:42:49 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 114 114 ULONG MsgPaint(ULONG tmp1, BOOL select = TRUE); 115 115 ULONG MsgEraseBackGround(HDC hdc); 116 ULONG MsgHitTest( ULONG x, ULONG y);116 ULONG MsgHitTest(MSG *msg); 117 117 ULONG MsgNCPaint(); 118 118 ULONG MsgFormatFrame(WINDOWPOS *lpWndPos);
Note:
See TracChangeset
for help on using the changeset viewer.