From be37b22dd565fbb4eaf3889912dbca14db8037e4 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 27 Jan 2016 17:39:04 -1000 Subject: [PATCH] Win32 default arrow cursor --- lib/win/ApplicationWin32.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/win/ApplicationWin32.cpp b/lib/win/ApplicationWin32.cpp index 18a09e7..adede27 100644 --- a/lib/win/ApplicationWin32.cpp +++ b/lib/win/ApplicationWin32.cpp @@ -94,13 +94,6 @@ public: m_args(args), m_singleInstance(singleInstance) { - WIN32_CURSORS.m_arrow = LoadCursor(nullptr, IDC_ARROW); - WIN32_CURSORS.m_hResize = LoadCursor(nullptr, IDC_SIZEWE); - WIN32_CURSORS.m_vResize = LoadCursor(nullptr, IDC_SIZENS); - WIN32_CURSORS.m_ibeam = LoadCursor(nullptr, IDC_IBEAM); - WIN32_CURSORS.m_crosshairs = LoadCursor(nullptr, IDC_CROSS); - WIN32_CURSORS.m_wait = LoadCursor(nullptr, IDC_WAIT); - HMODULE dxgilib = LoadLibraryW(L"dxgi.dll"); if (!dxgilib) Log.report(LogVisor::FatalError, "unable to load dxgi.dll"); @@ -399,6 +392,13 @@ int ApplicationRun(IApplication::EPlatformType platform, platform != IApplication::EPlatformType::Auto) return 1; + WIN32_CURSORS.m_arrow = LoadCursor(nullptr, IDC_ARROW); + WIN32_CURSORS.m_hResize = LoadCursor(nullptr, IDC_SIZEWE); + WIN32_CURSORS.m_vResize = LoadCursor(nullptr, IDC_SIZENS); + WIN32_CURSORS.m_ibeam = LoadCursor(nullptr, IDC_IBEAM); + WIN32_CURSORS.m_crosshairs = LoadCursor(nullptr, IDC_CROSS); + WIN32_CURSORS.m_wait = LoadCursor(nullptr, IDC_WAIT); + /* One class for *all* boo windows */ WNDCLASS wndClass = { @@ -414,7 +414,7 @@ int ApplicationRun(IApplication::EPlatformType platform, L"BooWindow" }; wndClass.hIcon = LoadIconW(wndClass.hInstance, MAKEINTRESOURCEW(101)); - + wndClass.hCursor = WIN32_CURSORS.m_arrow; RegisterClassW(&wndClass); APP = new ApplicationWin32(cb, uniqueName, friendlyName, pname, args, singleInstance);