Update win32_window.cpp

replace NULL with nullptr
add Fatal Error caption to MessageBox
This commit is contained in:
McMassiveNZ
2023-05-06 21:36:02 +02:00
parent f71e2d49b2
commit a91fb07906

View File

@@ -72,9 +72,9 @@ bool Win32WindowImpl::init(WindowCreateParams params)
wc.hInstance = hInstance; wc.hInstance = hInstance;
wc.lpszClassName = className; wc.lpszClassName = className;
if (RegisterClassEx(&wc) == NULL) if (RegisterClassEx(&wc) == 0)
{ {
MessageBox(nullptr, "Call to RegisterClass failed", NULL, MB_OK); MessageBox(nullptr, "Call to RegisterClass failed", "Fatal Error", MB_OK);
return false; return false;
} }
@@ -84,14 +84,14 @@ bool Win32WindowImpl::init(WindowCreateParams params)
params.name, params.name,
WS_OVERLAPPEDWINDOW, WS_OVERLAPPEDWINDOW,
params.x, params.y, params.width, params.height, params.x, params.y, params.width, params.height,
NULL, nullptr,
NULL, nullptr,
hInstance, hInstance,
NULL); nullptr);
if (window == NULL) if (window == nullptr)
{ {
MessageBox(nullptr, "Call to CreateWindow failed", NULL, MB_OK); MessageBox(nullptr, "Call to CreateWindow failed", "Fatal Error", MB_OK);
return false; return false;
} }