windows_dpi 0.3.0

Provides an API for marking a process as DPI-aware on windows systems. Works for Windows 7+, using the newer API when available. Also provides a method for getting the DPI appropriate for an HWND. Methods are currently stubs for other platforms, if anybody would like to contribute to support other platforms I'm happy to help!
Documentation

windows_dpi windows_dpi on crates.io Build Status

[dependencies]
windows_dpi = "0.1"
extern crate windows_dpi;

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

    // 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);
}