windowsdpi windows</em>dpi on crates.io Build Status

toml [dependencies] windows_dpi = "0.1"

```rust extern crate windows_dpi;

fn main() { // Make sure the OS knows you're paying attention to DPI so it won't scale your window windowsdpi::enabledpi();

// Get the basic scaling factor so you can know how big to make your windows
let mut scaling_factor = windows_dpi::desktop_dpi();

let window = create_window(scaling_factor);
// Now that you have your window, check what its real scaling factor is
scaling_factor = unsafe { windows_dpi::get_dpi_for(window.platform_handle()) };

// Do some drawing stuff
draw_graphics(&window, scaling_factor);

} ```