From 8b9a306d6f24dbc08aeee16b115260406e79126d Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 8 Sep 2019 19:09:38 +0800 Subject: ... --- src/win/native/cursor.cpp | 2 +- src/win/native/native_window.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/win/native') diff --git a/src/win/native/cursor.cpp b/src/win/native/cursor.cpp index 987d2d54..8c0e393b 100644 --- a/src/win/native/cursor.cpp +++ b/src/win/native/cursor.cpp @@ -25,7 +25,7 @@ WinCursor::~WinCursor() { namespace { WinCursor* LoadWinCursor(const wchar_t* name) { - const auto handle = ::LoadCursorW(NULL, name); + const auto handle = static_cast(::LoadImageW(NULL, name, IMAGE_CURSOR, SM_CYCURSOR, SM_CYCURSOR, LR_SHARED)); if (handle == NULL) { throw Win32Error(::GetLastError(), "Failed to get system cursor."); } diff --git a/src/win/native/native_window.cpp b/src/win/native/native_window.cpp index bda84ea9..6a02c2fc 100644 --- a/src/win/native/native_window.cpp +++ b/src/win/native/native_window.cpp @@ -173,7 +173,7 @@ void WinNativeWindow::SetCursor(std::shared_ptr cursor) { L"Failed to set cursor. Last error code: {}.", ::GetLastError()))); }; - if (!::SetWindowLongPtrW(hwnd_, GCLP_HCURSOR, + if (!::SetClassLongPtrW(hwnd_, GCLP_HCURSOR, reinterpret_cast(c->GetHandle()))) { outputError(); return; -- cgit v1.2.3