Changeset 835 for trunk/src/user32/new/windowmsg.cpp
- Timestamp:
- Sep 5, 1999, 5:53:10 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/windowmsg.cpp
r741 r835 1 /* $Id: windowmsg.cpp,v 1. 9 1999-08-30 11:59:54sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.10 1999-09-05 15:53:10 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 19 19 #include <hooks.h> 20 20 #include "oslibwin.h" 21 #include "oslibmsg.h" 21 22 22 23 //****************************************************************************** … … 60 61 //****************************************************************************** 61 62 //****************************************************************************** 63 BOOL WIN32API PeekMessageA(LPMSG msg, HWND hwndOwner, UINT uMsgFilterMin, 64 UINT uMsgFilterMax, UINT fuRemoveMsg) 65 { 66 BOOL fFoundMsg; 67 68 fFoundMsg = OSLibWinPeekMsg(msg, 0, uMsgFilterMin, uMsgFilterMax, 69 (fuRemoveMsg & PM_REMOVE) ? 1 : 0, FALSE); 70 if(fFoundMsg) { 71 if (msg->message == WM_QUIT && (fuRemoveMsg & (PM_REMOVE))) { 72 //TODO: Post WM_QUERYENDSESSION message when WM_QUIT received and system is shutting down 73 } 74 } 75 return fFoundMsg; 76 } 77 //****************************************************************************** 78 //****************************************************************************** 79 BOOL WIN32API PeekMessageW(LPMSG msg, HWND hwndOwner, UINT uMsgFilterMin, 80 UINT uMsgFilterMax, UINT fuRemoveMsg) 81 { 82 BOOL fFoundMsg; 83 84 fFoundMsg = OSLibWinPeekMsg(msg, 0, uMsgFilterMin, uMsgFilterMax, 85 (fuRemoveMsg & PM_REMOVE) ? 1 : 0, FALSE); 86 if(fFoundMsg) { 87 if (msg->message == WM_QUIT && (fuRemoveMsg & (PM_REMOVE))) { 88 //TODO: Post WM_QUERYENDSESSION message when WM_QUIT received and system is shutting down 89 } 90 } 91 return fFoundMsg; 92 } 93 //****************************************************************************** 94 //****************************************************************************** 62 95 LONG WIN32API GetMessageExtraInfo(void) 63 96 { … … 88 121 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 89 122 if(!window) { 90 dprintf(("SendMessageA, window %x not found", hwnd));91 return 0;123 dprintf(("SendMessageA, window %x not found", hwnd)); 124 return 0; 92 125 } 93 126 return window->SendMessageA(msg, wParam, lParam); … … 102 135 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 103 136 if(!window) { 104 dprintf(("SendMessageW, window %x not found", hwnd));105 return 0;137 dprintf(("SendMessageW, window %x not found", hwnd)); 138 return 0; 106 139 } 107 140 return window->SendMessageW(msg, wParam, lParam); … … 115 148 116 149 if(hwnd == NULL) 117 return PostThreadMessageA(GetCurrentThreadId(), msg, wParam, lParam);150 return PostThreadMessageA(GetCurrentThreadId(), msg, wParam, lParam); 118 151 119 152 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 120 153 if(!window) { 121 dprintf(("PostMessageA, window %x not found", hwnd));122 return 0;154 dprintf(("PostMessageA, window %x not found", hwnd)); 155 return 0; 123 156 } 124 157 dprintf(("PostMessageA, %x %x %x %x", hwnd, msg, wParam, lParam)); … … 133 166 134 167 if(hwnd == NULL) 135 return PostThreadMessageW(GetCurrentThreadId(), msg, wParam, lParam);168 return PostThreadMessageW(GetCurrentThreadId(), msg, wParam, lParam); 136 169 137 170 window = Win32BaseWindow::GetWindowFromHandle(hwnd); 138 171 if(!window) { 139 dprintf(("PostMessageW, window %x not found", hwnd));140 return 0;172 dprintf(("PostMessageW, window %x not found", hwnd)); 173 return 0; 141 174 } 142 175 dprintf(("PostMessageW, %x %x %x %x", hwnd, msg, wParam, lParam)); … … 151 184 #endif 152 185 return O32_WaitMessage(); 153 }154 //******************************************************************************155 //******************************************************************************156 BOOL WIN32API PeekMessageA(LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)157 {158 #ifdef DEBUG159 // WriteLog("USER32: PeekMessage\n");160 #endif161 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);162 }163 //******************************************************************************164 //******************************************************************************165 BOOL WIN32API PeekMessageW( LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)166 {167 #ifdef DEBUG168 WriteLog("USER32: PeekMessageW\n");169 #endif170 // NOTE: This will not work as is (needs UNICODE support)171 return O32_PeekMessage(arg1, arg2, arg3, arg4, arg5);172 186 } 173 187 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.