winctx 0.0.20

A minimal window context for Rust on Windows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use anyhow::Result;
use winctx::window::FindWindow;

pub fn main() -> Result<()> {
    let Some(window) = FindWindow::new().class("se.tedro.Example").find()? else {
        println!("Could not find window");
        return Ok(());
    };

    window.copy_data(42, b"foobar")?;
    Ok(())
}