llwlib

Crates.iollwlib
lib.rsllwlib
version0.1.4
sourcesrc
created_at2024-08-30 12:18:07.166781
updated_at2024-09-02 14:28:17.435691
descriptionA costless windows api wrapper to create windows
homepage
repositoryhttps://github.com/barnabasd/llwlib
max_upload_size
id1357622
size9,530
Barnabás (barnabasd)

documentation

README

llwlib - A costless windows api wrapper to create windows

To create a window:

use llwlib::{Window, WindowProperties, WindowStyles};
use windows_sys::Win32::UI::WindowsAndMessaging::*;
use windows_sys::Win32::Foundation::*;

fn main() {
    Window::new(
        WindowProperties {
            style: WindowStyles { ..Default::default() },
            position: (CW_USEDEFAULT, CW_USEDEFAULT),
            classname: "class_name".into(),
            title: "Title".into(),
            size: (1200, 700)
        },
        wnd_proc,
        None,
        false,
        ()
    );
}

unsafe fn wnd_proc(hwnd: HWND, msg: u32, wp: WPARAM, lp: LPARAM, _: isize) -> LRESULT {
    DefWindowProcW(hwnd, msg, wp, lp)
}
Commit count: 0

cargo fmt