We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
u16
1 parent 0eba417 commit ad7ebbdCopy full SHA for ad7ebbd
src/platform/windows/wgl/context.rs
@@ -657,9 +657,14 @@ fn extension_loader_thread() -> WGLExtensionFunctions {
657
assert_ne!(window_class_atom, 0);
658
659
let mut extension_functions = WGLExtensionFunctions::default();
660
+ // The `lpClassName` parameter of `CreateWindowExA()` takes either
661
+ // a pointer to a string, or an `ATOM` / `u16` encoded in the lower
662
+ // bytes of the pointer. We do the latter by forcing an `as` cast of the
663
+ // ATOM to a pointer.
664
+ let lpClassName = window_class_atom as LPCSTR;
665
let window = winuser::CreateWindowExA(
666
0,
- window_class_atom as LPCSTR,
667
+ lpClassName,
668
window_class_name,
669
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
670
0 commit comments