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 create a borderless popup window correctly

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

Re: How to create a borderless popup window correctly

Post by salvadordf »

TCefWindowInfo is known as cef_window_info_t in CEF3 and it's declared here : https://github.com/chromiumembedded/cef ... ypes_win.h

Some parameters are the standard parameters required by CreateWindowEx() like ex_style, window_name, style, x, y, width, height, parent_window and menu.

Those parameters are initialized using a CefWindowInfo class declared here :
https://github.com/chromiumembedded/cef ... /cef_win.h

CefWindowInfo uses these functions :
  • SetAsChild : known as WindowInfoAsChild in CEF4Delphi.
  • SetAsPopup : known as WindowInfoAsPopUp in CEF4Delphi.
  • SetAsWindowless : knwon as WindowInfoAsWindowless in CEF4Delphi.
I guess it shouldn't be a problem to have a different "style" parameter but to be safe I would use WindowInfoAsChild, WindowInfoAsPopUp and WindowInfoAsWindowless only.
User avatar
salvadordf
Posts: 4086
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to create a borderless popup window correctly

Post by salvadordf »

You should use WindowInfoAsPopUp but you can modify the window style at runtime calling SetWindowLong. This is an example :
http://www.delphitricks.com/source-code ... n_bar.html

You will need the form handle to call SetWindowLong but you can call the GetParent function with TChromium.WindowHandle as parameter to get it.
Post Reply