Changeset 321 for trunk/src/user32/new/windowmsg.cpp
- Timestamp:
- Jul 17, 1999, 1:56:51 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/windowmsg.cpp
r314 r321 1 /* $Id: windowmsg.cpp,v 1. 5 1999-07-16 11:32:10sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.6 1999-07-17 11:52:24 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 18 18 #include <win.h> 19 19 #include <hooks.h> 20 #include "oslibwin.h" 20 21 21 22 //****************************************************************************** … … 24 25 { 25 26 dprintf(("USER32: PostQuitMessage\n")); 26 27 O32_PostQuitMessage(nExitCode); 28 } 29 //****************************************************************************** 30 //****************************************************************************** 31 LONG WIN32API DispatchMessageA( const MSG * msg) 32 { 33 LONG retval; 34 int painting; 35 Win32Window *window; 36 37 /* Process timer messages */ 38 if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER)) 39 { 40 if (msg->lParam) 41 { 42 return SendMessageA(msg->hwnd, msg->message, msg->wParam, GetTickCount()); 43 } 44 } 45 46 if (!msg->hwnd) return 0; 47 48 window = Win32Window::GetWindowFromHandle(msg->hwnd); 49 if(!window) { 50 dprintf(("DispatchMessageA, window %x not found", msg->hwnd)); 51 return 0; 52 } 53 54 painting = (msg->message == WM_PAINT); 55 if (painting) window->setFlags(window->getFlags() | WIN_NEEDS_BEGINPAINT); 56 57 retval = window->SendMessageA(msg->message, msg->wParam, msg->lParam ); 58 59 #if 0 60 window = Win32Window::GetWindowFromHandle(msg->hwnd); 61 if(!window) { 62 dprintf(("DispatchMessageA, window %x not found", msg->hwnd)); 63 return 0; 64 } 65 66 if (painting && (wndPtr->getFlags() & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) 67 { 68 ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n", 69 msg->hwnd); 70 wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; 71 /* Validate the update region to avoid infinite WM_PAINT loop */ 72 ValidateRect( msg->hwnd, NULL ); 73 } 74 #endif 75 return retval; 27 OSLibWinPostQuitMessage(nExitCode); 28 } 29 //****************************************************************************** 30 //****************************************************************************** 31 LONG WIN32API DispatchMessageA(const MSG * msg) 32 { 33 return OSLibWinDispatchMsg((MSG *)msg); 76 34 } 77 35 //****************************************************************************** … … 79 37 LONG WIN32API DispatchMessageW( const MSG * msg) 80 38 { 81 LONG retval; 82 int painting; 83 Win32Window *window; 84 85 /* Process timer messages */ 86 if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER)) 87 { 88 if (msg->lParam) 89 { 90 return SendMessageW(msg->hwnd, msg->message, msg->wParam, GetTickCount()); 91 } 92 } 93 94 if (!msg->hwnd) return 0; 95 96 window = Win32Window::GetWindowFromHandle(msg->hwnd); 97 if(!window) { 98 dprintf(("DispatchMessageW, window %x not found", msg->hwnd)); 99 return 0; 100 } 101 102 painting = (msg->message == WM_PAINT); 103 if (painting) window->setFlags(window->getFlags() | WIN_NEEDS_BEGINPAINT); 104 105 retval = window->SendMessageW(msg->message, msg->wParam, msg->lParam ); 106 107 #if 0 108 window = Win32Window::GetWindowFromHandle(msg->hwnd); 109 if(!window) { 110 dprintf(("DispatchMessageW, window %x not found", msg->hwnd)); 111 return 0; 112 } 113 114 if (painting && (wndPtr->getFlags() & WIN_NEEDS_BEGINPAINT) && wndPtr->hrgnUpdate) 115 { 116 ERR_(msg)("BeginPaint not called on WM_PAINT for hwnd %04x!\n", 117 msg->hwnd); 118 wndPtr->flags &= ~WIN_NEEDS_BEGINPAINT; 119 /* Validate the update region to avoid infinite WM_PAINT loop */ 120 ValidateRect( msg->hwnd, NULL ); 121 } 122 #endif 123 return retval; 39 return OSLibWinDispatchMsg((MSG *)msg, TRUE); 124 40 } 125 41 //****************************************************************************** … … 127 43 BOOL WIN32API TranslateMessage( const MSG * arg1) 128 44 { 129 #ifdef DEBUG 130 //// WriteLog("USER32: TranslateMessage\n"); 131 #endif 132 return O32_TranslateMessage(arg1); 45 // return O32_TranslateMessage(arg1); 46 return TRUE; 47 } 48 //****************************************************************************** 49 //****************************************************************************** 50 BOOL WIN32API GetMessageA( LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax) 51 { 52 return OSLibWinGetMsg(pMsg, hwnd, uMsgFilterMin, uMsgFilterMax); 53 } 54 //****************************************************************************** 55 //****************************************************************************** 56 BOOL WIN32API GetMessageW( LPMSG pMsg, HWND hwnd, UINT uMsgFilterMin, UINT uMsgFilterMax) 57 { 58 return OSLibWinGetMsg(pMsg, hwnd, uMsgFilterMin, uMsgFilterMax, TRUE); 59 } 60 //****************************************************************************** 61 //****************************************************************************** 62 LONG WIN32API GetMessageExtraInfo(void) 63 { 64 dprintf(("USER32: GetMessageExtraInfo\n")); 65 return O32_GetMessageExtraInfo(); 66 } 67 //****************************************************************************** 68 //****************************************************************************** 69 DWORD WIN32API GetMessagePos(void) 70 { 71 dprintf(("USER32: GetMessagePos\n")); 72 return O32_GetMessagePos(); 73 } 74 //****************************************************************************** 75 //****************************************************************************** 76 LONG WIN32API GetMessageTime(void) 77 { 78 dprintf(("USER32: GetMessageTime\n")); 79 return O32_GetMessageTime(); 133 80 } 134 81 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.