2

I'm use CEF 3.2454.1344.g2782fb8 (Chromium 45.0.2454.101) in my project in Delphi 10.1. (I have to use a fairly old version of CEF/Chromium for backwards compatibility with WinXP). I've tried to do SendMouseClickEvent - it works, but froze Chromium. Perhaps I have to use SendProcessMessage after this code, or something? Will be grateful for any help!

crm.Browser.Host.SetFocus(true);
event.x:=600;
event.y:=40;
event.modifiers:=[];
aType:=MBT_LEFT;
crm.Browser.Host.SendMouseClickEvent(event, aType, false,1);
crm.Browser.Host.SendMouseClickEvent(event, aType, true, 1);

UPDATE: Seems after this piece of code my application stops handle any mouse clicks at all - I can't click on any element on form, where Chromium located, but scroll still working. Any ideas?

Red October
  • 689
  • 2
  • 12
  • 31
  • What happened to your previous question regarding sending key events? You do know that you can answer your own questions if you find out the answer yourself, don't you? – Tom Brunberg Jun 20 '18 at 15:02
  • @TomBrunberg I know, but I haven't find an answer an decided to rephrase the question with SendMouseClickEvent – Red October Jun 20 '18 at 18:22
  • 1
    If you need Windows XP support you can upgrade up to the CEF 2623 branch. The 2454 branch is only needed if you need to use old NPAPI plugins for Java or Silverlight. If you decide to upgrade to the 2623 branch consider using OldCEF4Delphi. That project has an OSR demo that can be used to log mouse events. Once you have the right events sequence you can "replay" them in code. – Salvador Díaz Fau Jun 23 '18 at 07:08
  • I forgot the OldCEF4Delphi link : https://github.com/salvadordf/OldCEF4Delphi – Salvador Díaz Fau Jun 23 '18 at 07:14
  • @SalvadorDíazFau thank you, I'll check this branch. As far as I understand, its code have no backwards compatibility with CEF3? – Red October Jun 23 '18 at 11:06
  • OldCEF4Delphi and CEF4Delphi are based on the DCEF3 project but I did lots of changes. There are more than 30 demos and a forum for developers. – Salvador Díaz Fau Jun 23 '18 at 11:58

0 Answers0