Ignore:
Timestamp:
Aug 8, 2003, 3:30:22 PM (22 years ago)
Author:
sandervl
Message:

KOM: WM_IME_CHAR generation + processing added for DBCS input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/listbox.c

    r10195 r10216  
    29922992    case WM_CHAR:
    29932993    {
    2994 #ifdef __WIN32OS2__
    2995         static BOOL bDbcsLead = FALSE;
    2996         static CHAR cDbcsLead = 0;
    2997 
    29982994        WCHAR charW;
    29992995        if(unicode)
     
    30012997        else
    30022998        {
    3003             WCHAR charA = bDbcsLead ? (( wParam << 8 ) | cDbcsLead ) : wParam;
    3004             int   size = bDbcsLead ? 2 : 1;
    3005 
    3006             bDbcsLead = !bDbcsLead && IsDBCSLeadByte( wParam );
    3007 
    3008             if( bDbcsLead )
    3009                 cDbcsLead = wParam;
    3010             else
    3011                 MultiByteToWideChar(CP_ACP, 0, (LPSTR)&charA, size, &charW, 1);
    3012         }
    3013         return bDbcsLead ? 0 : LISTBOX_HandleChar( hwnd, descr, charW );
    3014 #else
     2999            CHAR charA = (CHAR)wParam;
     3000            MultiByteToWideChar(CP_ACP, 0, &charA, 1, &charW, 1);
     3001        }
     3002        return LISTBOX_HandleChar( hwnd, descr, charW );
     3003    }
     3004
     3005#ifdef __WIN32OS2__
     3006    case WM_IME_CHAR:
     3007    {
    30153008        WCHAR charW;
     3009
    30163010        if(unicode)
    30173011            charW = (WCHAR)wParam;
    30183012        else
    30193013        {
    3020             CHAR charA = (CHAR)wParam;
    3021             MultiByteToWideChar(CP_ACP, 0, &charA, 1, &charW, 1);
     3014            // always DBCS char
     3015            CHAR charA[ 2 ];
     3016
     3017            charA[ 0 ] = ( CHAR )( wParam >> 8 );
     3018            charA[ 1 ] = ( CHAR )wParam;
     3019
     3020            MultiByteToWideChar( CP_ACP, 0, ( LPSTR )charA, 2, ( LPWSTR )&charW, 1);
    30223021        }
    30233022        return LISTBOX_HandleChar( hwnd, descr, charW );
     3023    }
    30243024#endif
    3025     }
    30263025
    30273026    case WM_SYSTIMER:
Note: See TracChangeset for help on using the changeset viewer.