Changeset 10216 for trunk/src/user32/edit.c
- Timestamp:
- Aug 8, 2003, 3:30:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/edit.c
r10195 r10216 888 888 case WM_CHAR: 889 889 { 890 #ifdef __WIN32OS2__891 static BOOL bDbcsLead = FALSE;892 static CHAR cDbcsLead = 0;893 894 890 WCHAR charW; 895 891 DPRINTF_EDIT_MSG32("WM_CHAR"); … … 899 895 else 900 896 { 901 WCHAR charA = bDbcsLead ? (( wParam << 8 ) | cDbcsLead ) : wParam; 902 int size = bDbcsLead ? 2 : 1; 903 904 bDbcsLead = !bDbcsLead && IsDBCSLeadByte( wParam ); 905 906 if( bDbcsLead ) 907 cDbcsLead = wParam; 908 else 909 MultiByteToWideChar(CP_ACP, 0, (LPSTR)&charA, size, &charW, 1); 897 CHAR charA = wParam; 898 MultiByteToWideChar(CP_ACP, 0, &charA, 1, &charW, 1); 910 899 } 911 900 … … 916 905 break; 917 906 } 918 if( !bDbcsLead ) 919 EDIT_WM_Char(hwnd, es, charW); 920 #else 921 WCHAR charW; 922 DPRINTF_EDIT_MSG32("WM_CHAR"); 923 924 if(unicode) 925 charW = wParam; 926 else 927 { 928 CHAR charA = wParam; 929 MultiByteToWideChar(CP_ACP, 0, &charA, 1, &charW, 1); 930 } 931 932 if ((charW == VK_RETURN || charW == VK_ESCAPE) && es->hwndListBox) 933 { 934 if (SendMessageW(GetParent(hwnd), CB_GETDROPPEDSTATE, 0, 0)) 935 SendMessageW(GetParent(hwnd), WM_KEYDOWN, charW, 0); 936 break; 937 } 938 EDIT_WM_Char(hwnd, es, charW); 939 #endif 907 EDIT_WM_Char(hwnd, es, charW); 940 908 break; 941 909 } … … 1016 984 result = EDIT_WM_HScroll(hwnd, es, LOWORD(wParam), SHIWORD(wParam)); 1017 985 break; 986 987 #ifdef __WIN32OS2__ 988 case WM_IME_CHAR: 989 { 990 WCHAR charW; 991 DPRINTF_EDIT_MSG32("WM_IME_CHAR"); 992 993 if(unicode) 994 charW = wParam; 995 else 996 { 997 // always DBCS char 998 CHAR charA[ 2 ]; 999 1000 charA[ 0 ] = ( CHAR )( wParam >> 8 ); 1001 charA[ 1 ] = ( CHAR )wParam; 1002 1003 MultiByteToWideChar( CP_ACP, 0, ( LPSTR )charA, 2, ( LPWSTR )&charW, 1); 1004 } 1005 1006 EDIT_WM_Char(hwnd, es, charW); 1007 break; 1008 } 1009 #endif 1018 1010 1019 1011 case WM_KEYDOWN:
Note:
See TracChangeset
for help on using the changeset viewer.