@@ -26,7 +26,6 @@ use winapi::shared::windef::{HCURSOR, HWND};
26
26
use winapi:: shared:: winerror:: HRESULT_FROM_WIN32 ;
27
27
use winapi:: um:: errhandlingapi:: GetLastError ;
28
28
use winapi:: um:: shellscalingapi:: PROCESS_SYSTEM_DPI_AWARE ;
29
- use winapi:: um:: wingdi:: CreateSolidBrush ;
30
29
use winapi:: um:: winuser:: {
31
30
DispatchMessageW , GetAncestor , GetMessageW , LoadIconW , PostMessageW , PostQuitMessage ,
32
31
RegisterClassW , TranslateAcceleratorW , TranslateMessage , GA_ROOT , IDI_APPLICATION , MSG ,
@@ -74,7 +73,6 @@ impl Application {
74
73
unsafe {
75
74
let class_name = CLASS_NAME . to_wide ( ) ;
76
75
let icon = LoadIconW ( 0 as HINSTANCE , IDI_APPLICATION ) ;
77
- let brush = CreateSolidBrush ( 0xff_ff_ff ) ;
78
76
let wnd = WNDCLASSW {
79
77
style : 0 ,
80
78
lpfnWndProc : Some ( window:: win_proc_dispatch) ,
@@ -83,7 +81,7 @@ impl Application {
83
81
hInstance : 0 as HINSTANCE ,
84
82
hIcon : icon,
85
83
hCursor : 0 as HCURSOR ,
86
- hbrBackground : brush ,
84
+ hbrBackground : ptr :: null_mut ( ) , // We control all the painting
87
85
lpszMenuName : 0 as LPCWSTR ,
88
86
lpszClassName : class_name. as_ptr ( ) ,
89
87
} ;
0 commit comments