Skip to content

Commit d996d7d

Browse files
committed
Fix dummy window creation
1 parent 0ee5a1f commit d996d7d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wrappers/win32/window.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ pub fn create_window<W: WindowImpl>(
9494

9595
#[cfg(feature = "opengl")]
9696
pub fn with_dummy_window<T>(handler: impl FnOnce(HWnd) -> Result<T>) -> Result<T> {
97-
use windows_sys::Win32::UI::WindowsAndMessaging::CW_USEDEFAULT;
97+
use windows_sys::Win32::UI::WindowsAndMessaging::{DefWindowProcW, CW_USEDEFAULT};
9898

9999
let instance = HInstance::get_from_dll();
100-
let window_class = RegisteredClass::register_new(instance, None)?;
100+
let window_class = RegisteredClass::register_new(instance, Some(DefWindowProcW))?;
101101
let hwnd = unsafe {
102102
CreateWindowExW(
103103
0,

0 commit comments

Comments
 (0)