Can not modify window style on Sketchup 2023.1 by WIN API

Unable to modify the form style using the Windows API, the window will blink

require 'fiddle'
require 'fiddle/import'

module User32
  extend Fiddle::Importer
  dlload 'user32.dll'
  extern 'long SetWindowLong(long, int, long)'
  extern 'long GetWindowLong(long, int)'
  extern 'long FindWindow(char*, char*)'
end

title = Time.now.to_f.to_s
dialog = UI::HtmlDialog.new(
  {
    :dialog_title => title,
    :preferences_key => title,
    :scrollable => true, :resizable => true,
    :width => 600, :height => 400,
    :left => 100, :top => 100,
    :min_width => 50, :min_height => 50,
    :max_width => 1000, :max_height => 1000,
    :style => UI::HtmlDialog::STYLE_WINDOW
  })
dialog.set_url("http://www.sketchup.com")
dialog.show
UI.start_timer(0.1,false) do
  handle = User32.FindWindow(nil,title)
  _style = User32.GetWindowLong(handle, -16)
  puts _style
  # _style & ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU)
  style = _style & (~(0x00C00000 | 0x00040000 | 0x00020000 | 0x00010000 | 0x00080000))
  User32.SetWindowLong(handle, -16, style)
  puts User32.GetWindowLong(handle, -16)
end

SketchUp now uses the Qt framework for it’s GUI, instead of the old MFC framework.

Yes,I know. But in the end, they were all Win32 forms.And Sketchup 2023.0 is ok.

The migration to Qt objects has been an ongoing project, so yes you will see changes as they occur with releases beginning with 2022 on up.

I suppose what I am getting at is that you should look into why Qt objects do not respond to low level Win32 calls. I do not believe this is something that was purposefully done by the SketchUp Team.

You are right.I should first verify whether it is caused by the QT framework itself.
Based on the performance of 2023.0 and 2023.1, I thought it was due to some official adjustments.

I don’t think so. I think it would be due to the Qt library redrawing the UI.

Going forward perhaps making Qt calls might be the better way.

I also encountered the same problem, is there any solution?