Changeset 10185 for trunk/src/user32/windowmsg.cpp
- Timestamp:
- Jul 28, 2003, 1:35:32 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/windowmsg.cpp
r10104 r10185 1 /* $Id: windowmsg.cpp,v 1.4 2 2003-05-16 10:59:28sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.43 2003-07-28 11:27:50 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 105 105 return FALSE; 106 106 } 107 107 108 108 // only WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, WM_SYSKEYUP 109 109 // can go into TranslateMessage 110 110 111 111 return OSLibWinTranslateMessage((MSG *)msg); 112 112 } … … 140 140 { 141 141 BOOL fFoundMsg; 142 142 143 143 dprintf2(("PeekMessageA %x %d-%d %d", hwndOwner, uMsgFilterMin, uMsgFilterMax, fuRemoveMsg)); 144 144 fFoundMsg = OSLibWinPeekMsg(msg, hwndOwner, uMsgFilterMin, uMsgFilterMax, … … 314 314 * when the WM_SETTEXT message has been used to set the icon 315 315 */ 316 INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPARAM *plparam )316 INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plparam ) 317 317 { 318 318 switch(msg) … … 321 321 { 322 322 LPARAM *ptr = (LPARAM *)HeapAlloc( GetProcessHeap(), 0, 323 wParam * sizeof(WCHAR) + sizeof(LPARAM) );323 *pwparam * sizeof(WCHAR) + sizeof(LPARAM) ); 324 324 if (!ptr) return -1; 325 325 *ptr++ = *plparam; /* Store previous lParam */ … … 431 431 return 1; 432 432 433 /* kso 2003-07-03: to make password field work, I took this from latest wine code. (winproc.c) */ 434 case EM_SETPASSWORDCHAR: 435 { 436 BYTE ch = LOWORD(*pwparam); 437 WCHAR wch = 0; 438 MultiByteToWideChar(CP_ACP, 0, (LPCSTR)&ch, 1, &wch, 1); 439 *pwparam = MAKEWPARAM( wch, HIWORD(*pwparam) ); 440 } 441 return 0; 442 433 443 case WM_ASKCBFORMATNAME: 434 444 case WM_DEVMODECHANGE: 435 445 case WM_PAINTCLIPBOARD: 436 446 case WM_SIZECLIPBOARD: 437 case EM_SETPASSWORDCHAR:438 447 // FIXME_(msg)("message %s (0x%x) needs translation, please report\n", SPY_GetMsgName(msg), msg ); 439 448 return -1; … … 810 819 LRESULT result; 811 820 812 if (WINPROC_MapMsg32ATo32W( hwnd, msg, wParam, &lParam ) == -1) return 0;821 if (WINPROC_MapMsg32ATo32W( hwnd, msg, &wParam, &lParam ) == -1) return 0; 813 822 result = func( hwnd, msg, wParam, lParam ); 814 823 WINPROC_UnmapMsg32ATo32W( hwnd, msg, wParam, lParam ); … … 911 920 //TODO: Ignoring all messages could be dangerous. But processing them, 912 921 //while the app doesn't expect any, isn't safe either. 913 if(PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 922 if(PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 914 923 { 915 924 if (msg.message == WM_QUIT) { … … 965 974 //TODO: Ignoring all messages could be dangerous. But processing them, 966 975 //while the app doesn't expect any, isn't safe either. 967 if(PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 976 if(PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 968 977 { 969 978 if (msg.message == WM_QUIT) { … … 971 980 return WAIT_ABANDONED; 972 981 } 973 982 974 983 /* otherwise dispatch it */ 975 984 DispatchMessageA(&msg); … … 1036 1045 //TODO: Ignoring all messages could be dangerous. But processing them, 1037 1046 //while the app doesn't expect any, isn't safe either. 1038 if(PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 1047 if(PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) 1039 1048 { 1040 1049 if (msg.message == WM_QUIT) {
Note:
See TracChangeset
for help on using the changeset viewer.