Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Delphi XE5 and OSRIME

Post Reply
Albus

Delphi XE5 and OSRIME

Post 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.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Delphi XE5 and OSRIME

Post by salvadordf »

Sorry about that. I couldn't find what version introduced ImmAssociateContextEx.

Please, download CEF4Delphi again.
Albus

Re: Delphi XE5 and OSRIME

Post by Albus »

Thank you! Now I it's working fine.
Post Reply