I am working on a cross platform app in Flutter and I want to launch an app with a translucent background without title bar and without the window control buttons. In the bottom right corner of the screen.
It seems to work well but when launching the app it will first show an border and title bar. Then when I start to resize the window it will look like I intended.
This is the code I used for the effect:
HWND window = CreateWindow(
window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
Scale(size.width, scale_factor), Scale(size.height, scale_factor),
nullptr, nullptr, GetModuleHandle(nullptr), this);
// Hide the window control buttons (minimize, maximize, close)
SetWindowLong(window, GWL_STYLE, GetWindowLong(window, GWL_STYLE) & ~WS_SYSMENU);
// Hide the window titlebar
SetWindowLong(window, GWL_STYLE, GetWindowLong(window, GWL_STYLE) & ~WS_CAPTION);
And this is what it looks like when the app launches:
This is how I want the app to launch (after resizing, it will look like this):