Delphi XE5 and OSRIME
Posted: Thu Jan 10, 2019 8:44 am
Hi, yesterday I updated our chromium to the latest version. But while I tried to compile the CEF4Delphi package, I encountered some errors. In the new file "uCEFOSRIMEHandler.pas" you have this code (starting at line 591):
The problem is the compiler directive DELPHI16_UP. In the cef.inc file I saw that this means Delphi XE2 and up. But the ImmAssociateContextEx Call does not exit in Delphi XE5. It exists in version XE8, but I don't checked XE6 and XE7.
Code: Select all
procedure TCEFOSRIMEHandler.EnableIME;
begin
{$IFDEF MSWINDOWS}
if Initialized then
begin
{$IFDEF DELPHI16_UP}
ImmAssociateContextEx(FHWND, 0, IACE_DEFAULT);
{$ELSE}
ImmAssociateContext(FHWND, 0);
{$ENDIF}
end;
{$ENDIF}
end;
procedure TCEFOSRIMEHandler.DisableIME;
begin
{$IFDEF MSWINDOWS}
if Initialized then
begin
CleanupComposition();
{$IFDEF DELPHI16_UP}
ImmAssociateContextEx(FHWND, 0, 0);
{$ELSE}
ImmAssociateContext(FHWND, 0);
{$ENDIF}
end;
{$ENDIF}
end;