Changeset 2400 for trunk/src/user32/new/oslibmsgtranslate.cpp
- Timestamp:
- Jan 11, 2000, 12:29:16 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/oslibmsgtranslate.cpp
r2381 r2400 1 /* $Id: oslibmsgtranslate.cpp,v 1. 9 2000-01-09 14:14:23 cbratschiExp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.10 2000-01-10 23:29:12 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 133 133 POSTMSG_PACKET *packet; 134 134 THDB *thdb = (THDB *)pThdb; 135 ULONG hittest; 135 136 int i; 136 137 … … 138 139 win32wnd = Win32BaseWindow::GetWindowFromOS2Handle(os2Msg->hwnd); 139 140 if (!win32wnd) win32wnd = Win32BaseWindow::GetWindowFromOS2FrameHandle(os2Msg->hwnd); 141 140 142 //PostThreadMessage posts WIN32APP_POSTMSG msg without window handle 141 if(win32wnd == 0 && (os2Msg->msg != WM_CREATE && os2Msg->msg != WM_QUIT && os2Msg->msg != WIN32APP_POSTMSG)) 143 //Realplayer starts a timer with hwnd 0 & proc 0; check this here 144 if(win32wnd == 0 && (os2Msg->msg != WM_CREATE && os2Msg->msg != WM_QUIT && os2Msg->msg != WM_TIMER && os2Msg->msg != WIN32APP_POSTMSG)) 142 145 { 143 146 goto dummymessage; //not a win32 client window … … 167 170 case WM_BUTTON3DBLCLK: 168 171 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 172 173 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y); 174 169 175 if (IsNCMouseMsg(win32wnd)) { 170 176 winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN); 171 winMsg->wParam = win32wnd->lastHitTestVal;177 winMsg->wParam = hittest; 172 178 winMsg->lParam = MAKELONG(winMsg->pt.x, winMsg->pt.y); //screen coordinates 173 179 } … … 199 205 { 200 206 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 201 if(IsNCMouseMsg(win32wnd)) 207 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y); 208 209 if (IsNCMouseMsg(win32wnd)) 202 210 { 203 211 winMsg->message = WINWM_NCMOUSEMOVE; 204 winMsg->wParam = (WPARAM) win32wnd->lastHitTestVal;212 winMsg->wParam = (WPARAM)hittest; 205 213 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 206 } else 214 } 215 else 207 216 { 208 217 winMsg->message = WINWM_MOUSEMOVE; … … 220 229 } 221 230 222 case WM_ HITTEST:231 case WM_ACTIVATE: 223 232 { 224 winMsg->message = WINWM_NCHITTEST; 225 winMsg->wParam = 0; 226 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 227 return TRUE; 233 winMsg->message = WINWM_NCACTIVATE; 234 winMsg->wParam = SHORT1FROMMP(os2Msg->mp1); 235 return TRUE; 228 236 } 237 229 238 } 230 239 //do normal translation for all other messages … … 346 355 case WM_BUTTON3DBLCLK: 347 356 //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window 357 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y); 358 348 359 if(IsNCMouseMsg(win32wnd)) { 349 360 winMsg->message = WINWM_NCLBUTTONDOWN + (os2Msg->msg - WM_BUTTON1DOWN); 350 winMsg->wParam = win32wnd->lastHitTestVal;361 winMsg->wParam = hittest; 351 362 winMsg->lParam = MAKELONG(winMsg->pt.x, winMsg->pt.y); //screen coordinates 352 363 } … … 378 389 { 379 390 //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window 391 hittest = win32wnd->MsgHitTest(winMsg->pt.x, winMsg->pt.y); 392 380 393 if(IsNCMouseMsg(win32wnd)) 381 394 { 382 395 winMsg->message = WINWM_NCMOUSEMOVE; 383 winMsg->wParam = (WPARAM) win32wnd->lastHitTestVal;396 winMsg->wParam = (WPARAM)hittest; 384 397 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y); 385 398 } else … … 578 591 579 592 if(wndParams->fsStatus & WPM_TEXT) { 580 win32wnd->MsgSetText(wndParams->pszText, wndParams->cchText); 593 winMsg->message = WINWM_SETTEXT; 594 winMsg->lParam = (LPARAM)wndParams->pszText; 581 595 break; 582 596 } … … 612 626 } 613 627 else winMsg->message = WINWM_PAINT; 614 break;615 }616 617 case WM_HITTEST:618 {619 winMsg->message = WINWM_NCHITTEST;620 winMsg->wParam = 0;621 winMsg->lParam = MAKELONG(winMsg->pt.x,winMsg->pt.y);622 628 break; 623 629 }
Note:
See TracChangeset
for help on using the changeset viewer.