orbtk icon indicating copy to clipboard operation
orbtk copied to clipboard

Window Decorations: Enable/Disable

Open HTGAzureX1212 opened this issue 2 years ago • 1 comments

Context

I am currently trying to create a window with no decorations (and specifically without the title bar as well).

Problem description & Solution

Prior art: issue https://github.com/redox-os/orbtk/issues/337 describes how the .borderless() method could be used to disable borders of a window (which does not include the title bar on Windows). As a result, the title bar is not removed and does not satisfy my current needs.

A proposed API to implement this is probably a .window_decorations() method on the Window structure which takes in an IntoPropertySource<bool> or something ~~or maybe some bikeshedding on the method name...?~~.

Or, maybe extend the .borderless() function to take into consideration for removing the title bar as well for Windows.

HTGAzureX1212 avatar Dec 15 '21 09:12 HTGAzureX1212

In traditional WinForm programs, the C++ code can be used to hide the title bar.

SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) & ~WS_CAPTION);

Cy6er7um avatar Mar 16 '22 16:03 Cy6er7um