gabdube / native-windows-gui

A light windows GUI toolkit for rust
https://gabdube.github.io/native-windows-gui/
MIT License
1.96k stars 127 forks source link

Allow seting WS_CAPTION on window creation #296

Open eugenesvk opened 4 months ago

eugenesvk commented 4 months ago

Currently not all window flags are exposed in the WindowFlags struct, so I thought I'd manually remove the title with

let mut myflags = wf::MAIN_WINDOW;
myflags &= unsafe{nwg::WindowFlags::from_bits_unchecked(!WS_CAPTION)};

but the title is created anyway, I guess since windowbuilder always accepts some string as its title, and can't accept None?

(if I use set_style after window builder creates a window, it seems to work and the title is removed)