Add a background brush to the window

So the background always gets cleared out when the window resizes.
This commit is contained in:
Robbert van der Helm
2020-12-27 14:24:50 +01:00
parent 86c8b284a2
commit 35c7138333
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -666,6 +666,7 @@ ATOM register_window_class(std::string window_class_name) {
window_class.lpfnWndProc = window_proc;
window_class.hInstance = GetModuleHandle(nullptr);
window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
window_class.hbrBackground = CreateSolidBrush(RGB(32, 32, 32));
window_class.lpszClassName = window_class_name.c_str();
return RegisterClassEx(&window_class);