Changeset 3284 for trunk/src/user32/oslibmsgtranslate.cpp
- Timestamp:
- Mar 31, 2000, 4:42:49 PM (25 years ago)
- File:
-
- 1 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 }
Note:
See TracChangeset
for help on using the changeset viewer.