I'm sorry but I don't understand the question.
Could you please elaborate more of what kind of handle you seek?
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.
How to get handle select
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to get handle select
I still don't understand but if your problem is that you are not seeing the SELECT items then check these posible causes :
- In a normal browser you need to call TChromium.NotifyMoveOrResizeStarted when the form receives WM_MOVE or WM_MOVING. If you have multiple forms, intercept those messages with a TApplicationEvents component just to be sure. The SimpleBrowser2 demo has all this code.
- In a browser in OSR mode (off-screen mode) you need to use the TChromium.OnPopupShow and TChromium.OnPopupSize events. Then draw the SELECT items in TChromium.OnPaint. The SimpleOSRBrowser demo has all this code.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to get handle select
CEF3 captures many Windows messages and it only triggers some events in some occasions.
If you need to receive those messages there are 2 solutions :
If you need to receive those messages there are 2 solutions :
- Use the TChromium.OnRenderCompMsg event to filter all messages : There is a known bug with this event and it will only work in the first web page you load. If you need to capture messages all the time use TChromium.RenderHandle with SetWindowLongPtr and a custom procedure to handle the messages.
- Use TChromium in OSR mode. Take a look at the SimpleOSRBrowser demo. This demo shows a browser in off-screen rendering mode that allows you to receive all messages and VCL events but it's more complicated to implement.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to get handle select
I forgot that those messages can also be intercepted using a "External Message Pump".
Open the SimpleExternalPumpBrowser demo and add a TApplicationEvents and a TStatusBar with 1 panel.
Set the TApplicationEvents.OnMessage event with this code :
The same code works in OSR mode too with the SimpleOSRBrowser demo.
Open the SimpleExternalPumpBrowser demo and add a TApplicationEvents and a TStatusBar with 1 panel.
Set the TApplicationEvents.OnMessage event with this code :
Code: Select all
procedure TSimpleExternalPumpBrowserFrm.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean);
begin
case Msg.message of
WM_KEYDOWN : StatusBar1.Panels[0].Text := 'WM_KEYDOWN';
WM_KEYUP : StatusBar1.Panels[0].Text := '';
end;
end;