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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Change size chrome

Post Reply
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Change size chrome

Post by salvadordf »

Please, be more specific.

Every time that a new tab or popup needs to be created the TChromium.OnBeforePopup event is triggered.

That event has a popupFeatures parameter with information about the requested popup window.

The windowInfo parameter also has information about the control dimensions used by CEF3 as a parent to some new child "windows" (using the Windows API term) where the browser contents will be shown.

The code comments for TChromium.OnBeforePopup are these :

Code: Select all

  ///
  // Called on the UI thread before a new popup browser is created. The
  // |browser| and |frame| values represent the source of the popup request. The
  // |target_url| and |target_frame_name| values indicate where the popup
  // browser should navigate and may be empty if not specified with the request.
  // The |target_disposition| value indicates where the user intended to open
  // the popup (e.g. current tab, new tab, etc). The |user_gesture| value will
  // be true if the popup was opened via explicit user gesture (e.g. clicking a
  // link) or false if the popup opened automatically (e.g. via the
  // DomContentLoaded event). The |popupFeatures| structure contains additional
  // information about the requested popup window. To allow creation of the
  // popup browser optionally modify |windowInfo|, |client|, |settings| and
  // |no_javascript_access| and return false. To cancel creation of the popup
  // browser return true. The |client| and |settings| values will default to the
  // source browser's values. If the |no_javascript_access| value is set to
  // false the new browser will not be scriptable and may not be hosted in the
  // same renderer process as the source browser. Any modifications to
  // |windowInfo| will be ignored if the parent browser is wrapped in a
  // CefBrowserView. Popup browser creation will be canceled if the parent
  // browser is destroyed before the popup browser creation completes (indicated
  // by a call to OnAfterCreated for the popup browser).
  ///
If your app creates custom popups then you should use the popupFeatures values to resize the new form accordingly.

If you just want to resize a popup window created automatically by CEF3, then you need to use the Windows API functions commented here :
https://stackoverflow.com/questions/692 ... indows-api
Post Reply