Getting a handle and device context for the first monitor is relatively easy:
let h_wnd_screen = GetDesktopWindow();
let h_dc_screen = GetDC(h_wnd_screen);
// do stuff
ReleaseDC(h_wnd_screen, h_dc_screen);
Getting a handle and device context for the second monitor is worse than death:
struct monitor_enum_proc_data {
...
}
fn monitor_enum_proc(...) -> BOOL {
...
}
let data = monitor_enum_proc_data {
...
};
EnumDisplayMonitors(h_dc, lprc_clip, monitor_enum_proc, &data as LPARAM);
// call GetMonitorInfo() somewhere
// no end in sight
A simple helper function in gdi.rs, like Dc::get_monitor_window(usize) -> Dc, would go a long way.
Getting a handle and device context for the first monitor is relatively easy:
Getting a handle and device context for the second monitor is worse than death:
A simple helper function in gdi.rs, like
Dc::get_monitor_window(usize) -> Dc, would go a long way.