Changeset 10216 for trunk/src/user32/windowmsg.cpp
- Timestamp:
- Aug 8, 2003, 3:30:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/windowmsg.cpp
r10204 r10216 1 /* $Id: windowmsg.cpp,v 1.4 6 2003-08-04 17:01:58sandervl Exp $ */1 /* $Id: windowmsg.cpp,v 1.47 2003-08-08 13:30:22 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message APIs for OS/2 … … 35 35 #include "timer.h" 36 36 37 #define DBG_LOCALLOG 37 #define DBG_LOCALLOG DBG_windowmsg 38 38 #include "dbglocal.h" 39 39 … … 50 50 if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER)) 51 51 { 52 52 if (msg->lParam) 53 53 { 54 54 /* HOOK_CallHooks32A( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */ … … 56 56 /* before calling window proc, verify whether timer is still valid; 57 57 there's a slim chance that the application kills the timer 58 58 between GetMessage and DispatchMessage API calls */ 59 59 if (!TIMER_IsTimerValid(msg->hwnd, (UINT) msg->wParam, msg->lParam)) 60 60 return 0; /* invalid winproc */ 61 61 62 62 return CallWindowProcA( (WNDPROC)msg->lParam, msg->hwnd, 63 63 msg->message, msg->wParam, GetTickCount() ); 64 64 } … … 76 76 if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER)) 77 77 { 78 78 if (msg->lParam) 79 79 { 80 80 /* HOOK_CallHooks32A( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */ … … 82 82 /* before calling window proc, verify whether timer is still valid; 83 83 there's a slim chance that the application kills the timer 84 84 between GetMessage and DispatchMessage API calls */ 85 85 if (!TIMER_IsTimerValid(msg->hwnd, (UINT) msg->wParam, msg->lParam)) 86 86 return 0; /* invalid winproc */ 87 87 88 88 return CallWindowProcW( (WNDPROC)msg->lParam, msg->hwnd, 89 89 msg->message, msg->wParam, GetTickCount() ); 90 90 } … … 100 100 (msg->message > WM_SYSKEYUP)|| 101 101 (msg->message == WM_CHAR) || 102 #ifdef __WIN32OS2__ 103 (msg->message == WM_DEADCHAR)|| 104 (msg->message == WM_IME_CHAR) ) 105 #else 102 106 (msg->message == WM_DEADCHAR) ) 107 #endif 103 108 { 104 109 SetLastError(ERROR_INVALID_PARAMETER); … … 448 453 return 0; 449 454 455 #ifdef __WIN32OS2__ 456 case WM_IME_CHAR: 457 { 458 // always DBCS char 459 CHAR charA[ 2 ]; 460 461 charA[ 0 ] = ( CHAR )( *pwparam >> 8 ); 462 charA[ 1 ] = ( CHAR )*pwparam; 463 464 MultiByteToWideChar( CP_ACP, 0, ( LPSTR )charA, 2, ( LPWSTR )pwparam, 1); 465 466 return 0; 467 } 468 #endif 469 450 470 case WM_PAINTCLIPBOARD: 451 471 case WM_SIZECLIPBOARD: … … 725 745 return 0; 726 746 747 #ifdef __WIN32OS2__ 748 case WM_IME_CHAR: 749 { // always DBCS char 750 CHAR charA[ 2 ]; 751 752 WideCharToMultiByte( CP_ACP, 0, ( LPWSTR )pwparam, 1, ( LPSTR )charA, 2, 0, 0 ); 753 *pwparam = ( charA[ 0 ] << 8 ) | charA[ 1 ]; 754 755 return 0; 756 } 757 #endif 758 727 759 case WM_PAINTCLIPBOARD: 728 760 case WM_SIZECLIPBOARD: … … 862 894 LRESULT result; 863 895 864 #ifdef __WIN32OS2__865 if( IsDBCSEnv() && msg == WM_CHAR )866 {867 static BYTE dbcsLead = 0;868 WCHAR charA = wParam;869 int size = dbcsLead ? 2 : 1;870 871 if( dbcsLead )872 charA = ( charA << 8 ) | dbcsLead;873 else if( IsDBCSLeadByte( wParam ))874 {875 dbcsLead = wParam;876 return 0;877 }878 MultiByteToWideChar( CP_ACP, 0, ( LPSTR )&charA, size, ( LPWSTR )&wParam, 1 );879 880 dbcsLead = 0;881 }882 else883 #endif884 896 if (WINPROC_MapMsg32ATo32W( hwnd, msg, &wParam, &lParam ) == -1) return 0; 885 897 … … 888 900 889 901 #ifdef __WIN32OS2__ 890 if(IsDBCSEnv()) 902 if(IsDBCSEnv()) 891 903 { 892 904 switch( msg ) … … 940 952 LRESULT result; 941 953 942 #ifdef __WIN32OS2__943 if( IsDBCSEnv() && msg == WM_CHAR )944 {945 char charA[ 2 ];946 947 if( WideCharToMultiByte( CP_ACP, 0, ( LPWSTR )&wParam, 1, ( LPSTR )charA, 2, 0, 0 ) > 1 )948 {949 func( hwnd, msg, ( WPARAM )charA[ 0 ], lParam );950 wParam = charA[ 1 ];951 }952 else953 wParam = charA[ 0 ];954 }955 else956 #endif957 954 if (WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam ) == -1) return 0; 958 955
Note:
See TracChangeset
for help on using the changeset viewer.