Page 1 of 1

Delphi XE5 and OSRIME

Posted: Thu Jan 10, 2019 8:44 am
by Albus
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):

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;
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.

Re: Delphi XE5 and OSRIME

Posted: Thu Jan 10, 2019 9:01 am
by salvadordf
Sorry about that. I couldn't find what version introduced ImmAssociateContextEx.

Please, download CEF4Delphi again.

Re: Delphi XE5 and OSRIME

Posted: Thu Jan 10, 2019 9:14 am
by Albus
Thank you! Now I it's working fine.