X-Git-Url: http://git.tdb.fi/?p=libs%2Fgui.git;a=blobdiff_plain;f=source%2Fgraphics%2Fwindows%2Fwindow.cpp;fp=source%2Fgraphics%2Fwindows%2Fwindow.cpp;h=e7ec9109c5fa16f1f19db2f5930359cd77a39d17;hp=b90498bc53dbcf650b6ae1f6c5c31ee3a83bec69;hb=507fa60f32bd3f64840a2cdd1be5d68478432b55;hpb=cea95778acfd6e172639cafd7ad249cc13ceb2a6 diff --git a/source/graphics/windows/window.cpp b/source/graphics/windows/window.cpp index b90498b..e7ec910 100644 --- a/source/graphics/windows/window.cpp +++ b/source/graphics/windows/window.cpp @@ -50,12 +50,12 @@ void Window::platform_init() wndcl.cbClsExtra = 0; wndcl.cbWndExtra = sizeof(Window *); wndcl.hInstance = reinterpret_cast(Application::get_data()); - wndcl.hIcon = 0; - wndcl.hCursor = LoadCursor(0, IDC_ARROW); - wndcl.hbrBackground = 0; - wndcl.lpszMenuName = 0; + wndcl.hIcon = nullptr; + wndcl.hCursor = LoadCursor(nullptr, IDC_ARROW); + wndcl.hbrBackground = nullptr; + wndcl.lpszMenuName = nullptr; wndcl.lpszClassName = "mspgui"; - wndcl.hIconSm = 0; + wndcl.hIconSm = nullptr; if(!RegisterClassEx(&wndcl)) throw system_error("RegisterClassEx"); @@ -121,18 +121,18 @@ void Window::platform_reconfigure(bool fullscreen_changed) } if(options.fullscreen) - SetWindowPos(priv->window, 0, 0, 0, rect.right-rect.left, rect.bottom-rect.top, SWP_NOZORDER); + SetWindowPos(priv->window, nullptr, 0, 0, rect.right-rect.left, rect.bottom-rect.top, SWP_NOZORDER); else if(options.user_position) - SetWindowPos(priv->window, 0, options.x, options.y, rect.right-rect.left, rect.bottom-rect.top, SWP_NOZORDER); + SetWindowPos(priv->window, nullptr, options.x, options.y, rect.right-rect.left, rect.bottom-rect.top, SWP_NOZORDER); else - SetWindowPos(priv->window, 0, 0, 0, rect.right-rect.left, rect.bottom-rect.top, SWP_NOMOVE|SWP_NOZORDER); + SetWindowPos(priv->window, nullptr, 0, 0, rect.right-rect.left, rect.bottom-rect.top, SWP_NOMOVE|SWP_NOZORDER); } void Window::show_cursor(bool s) { priv->cursor_visible = s; if(priv->cursor_in_client_area && !s) - SetCursor(NULL); + SetCursor(nullptr); } void Window::warp_pointer(int, int) @@ -222,7 +222,7 @@ bool Window::event(const Event &evnt) case WM_SETCURSOR: priv->cursor_in_client_area = (LOWORD(evnt.lparam)==HTCLIENT); if(priv->cursor_in_client_area && !priv->cursor_visible) - SetCursor(NULL); + SetCursor(nullptr); else return false; break;