Ignore:
Timestamp:
Nov 9, 2009, 7:22:05 PM (16 years ago)
Author:
vladest
Message:

Fixed double chars in standalone apps
Fixed umlaut and other national characters suppot in inputline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/pmwindow.cpp

    r21347 r21348  
    2323#include <os2wrap.h>
    2424#include <odinwrap.h>
     25#include <stdio.h>
    2526#include <stdlib.h>
    2627#include <string.h>
     
    146147extern "C" ULONG OSLibImSetMsgQueueProperty( ULONG, ULONG );
    147148
     149int cp2cp(char *cp1, char *cp2, char *src, char *dst, int len);
     150
    148151//******************************************************************************
    149152// Initialize PM; create hab, message queue and register special Win32 window classes
     
    597600        }
    598601        pWinMsg = &winMsg;
     602
    599603    }
    600604    else {
     
    940944        {
    941945            MSG extramsg;
     946            char cpfrom[10] = {0};
     947            char cpto[10] = {0};
     948            ULONG       ulCpSize, ulCP;
     949
     950
    942951            memcpy(&extramsg, pWinMsg, sizeof(MSG));
    943952            extramsg.message = WINWM_CHAR;
    944             extramsg.wParam = (ULONG)mp2;
     953            DosQueryCp(sizeof(ulCP), &ulCP, &ulCpSize);
     954            sprintf(cpfrom,"IBM-%d\0", ulCP);
     955            sprintf(cpto,"IBM-%d\0", GetDisplayCodepage());
     956            if (cp2cp(cpfrom, cpto, (char*)&mp2, (char*)&extramsg.wParam, 1))
     957                extramsg.wParam = (ULONG)mp2;
     958
    945959            if(SHORT1FROMMP(mp1) & KC_DEADKEY)
    946960            {
    947961                extramsg.message++;  //WM_DEADCHAR/WM_SYSDEADCHAR
    948962            }
    949            
     963
    950964            win32wnd->MsgChar(&extramsg);
    951         }
    952 
     965            goto RunDefWndProc;
     966        }
    953967        break;
    954968
Note: See TracChangeset for help on using the changeset viewer.