Changeset 2250 for trunk/src/user32/oslibmsg.cpp
- Timestamp:
- Dec 29, 1999, 3:37:19 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsg.cpp
r2246 r2250 1 /* $Id: oslibmsg.cpp,v 1.1 7 1999-12-29 12:39:44sandervl Exp $ */1 /* $Id: oslibmsg.cpp,v 1.18 1999-12-29 14:37:16 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 124 124 ULONG TranslateWinMsg(ULONG msg, BOOL fMinFilter) 125 125 { 126 POSTMSG_PACKET *packet;127 128 126 if(msg == 0) 129 127 return 0; … … 235 233 } while (eaten); 236 234 } 237 OS2ToWinMsgTranslate((PVOID)thdb, MsgThreadPtr, pMsg, isUnicode );235 OS2ToWinMsgTranslate((PVOID)thdb, MsgThreadPtr, pMsg, isUnicode, MSG_REMOVE); 238 236 return rc; 239 237 } … … 287 285 } 288 286 289 OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode );287 OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode, (fRemove & PM_REMOVE_W) ? MSG_REMOVE : MSG_NOREMOVE); 290 288 //TODO: This is not safe! There's no guarantee this message will be dispatched and it might overwrite a previous message 291 289 if(fRemove & PM_REMOVE_W) { … … 366 364 //****************************************************************************** 367 365 //****************************************************************************** 368 BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)369 { 370 return WinPostMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);371 } 372 //****************************************************************************** 373 //****************************************************************************** 374 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam) 375 { 376 return (ULONG)WinSendMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);366 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode) 367 { 368 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 369 370 packet->Msg = msg; 371 packet->wParam = wParam; 372 packet->lParam = lParam; 373 374 return (ULONG)WinSendMsg(hwnd, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet); 377 375 } 378 376 //****************************************************************************** … … 380 378 ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend) 381 379 { 382 return WinBroadcastMsg(HWND_DESKTOP, msg, (MPARAM)wParam, (MPARAM)lParam, 383 (fSend) ? BMSG_SEND : BMSG_POST); 384 } 385 //****************************************************************************** 386 //****************************************************************************** 387 BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam) 380 return WinBroadcastMsg(HWND_DESKTOP, msg, (MPARAM)wParam, (MPARAM)lParam, 381 (fSend) ? BMSG_SEND : BMSG_POST); 382 } 383 //****************************************************************************** 384 //****************************************************************************** 385 BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode) 386 { 387 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 388 389 packet->Msg = msg; 390 packet->wParam = wParam; 391 packet->lParam = lParam; 392 return WinPostMsg(hwnd, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet); 393 } 394 //****************************************************************************** 395 //****************************************************************************** 396 BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode) 388 397 { 389 398 THDB *thdb = GetTHDBFromThreadId(threadid); 399 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET)); 390 400 391 401 if(thdb == NULL) { … … 393 403 return FALSE; 394 404 } 395 return WinPostQueueMsg(thdb->hmq, msg, (MPARAM)wParam, (MPARAM)lParam); 396 } 397 //****************************************************************************** 398 //****************************************************************************** 399 405 dprintf(("PostThreadMessageA %x %x %x %x", threadid, msg, wParam, lParam)); 406 packet->Msg = msg; 407 packet->wParam = wParam; 408 packet->lParam = lParam; 409 return WinPostQueueMsg(thdb->hmq, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet); 410 } 411 //****************************************************************************** 412 //****************************************************************************** 413
Note:
See TracChangeset
for help on using the changeset viewer.