Page 1 of 1

Problem with DevExpress components

Posted: Wed Mar 24, 2021 9:54 pm
by asparagas
I have CefWindowParent locked inside dxDockPanel.

When I double click the dxDockPanel or try to move it to another position, the program quits (closing).

What would be the reason?

Re: Problem with DevExpress components

Posted: Thu Mar 25, 2021 2:07 pm
by salvadordf
Hi,

CefWindowParent is the parent control of some "windows" (using the Windows API term) created by CEF.

If those child "windows" are destroyed then CEF thinks the application is closing and it starts shutting down the browser. In that situation, CEF may send a WM_CLOSE to the parent form.

Use the TChromium.OnClose event and set the aAction to cbaCancel to cancel the browser destruction while the user performs those actions with dxDockPanel.

If that's not possible then try calling TChromium.SetNewBrowserParent to a hidden TCEFWindowParent before you dock/undock the browser. When dock/undock is finished then call TChromium.SetNewBrowserParent again to the old TCEFWindowParent component.