use fltk::{prelude::*, *};
use std::os::raw::*;
const GWL_EXSTYLE: i32 = -20;
const WS_EX_APPWINDOW: c_ulong = 0x00040000;
extern "system" {
pub fn GetWindowLongA(wnd: *mut c_void, idx: c_int) -> c_ulong;
pub fn SetWindowLongA(wnd: *mut c_void, idx: c_int, newval: c_ulong) -> c_long;
}
fn main() {
let app = app::App::default();
let mut win = window::Window::default()
.with_size(400, 300)
.with_label("Test");
win.end();
win.set_border(false);
win.show();
unsafe {
let handle = win.raw_handle();
let mut style_ex = GetWindowLongA(handle, GWL_EXSTYLE);
style_ex |= WS_EX_APPWINDOW;
SetWindowLongA(handle, GWL_EXSTYLE, style_ex);
}
app.run().unwrap();
}
标签:mut,handle,fltk,rs,win,app,标题栏,let,GWL
From: https://www.cnblogs.com/dgmv/p/18202762