MyGUI library.
There's a line in its sources:
mHandle = (size_t)::LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW));
mHandle is size_t
LoadCursor returns HCURSOR.
Error:
D:\Dev\MyGUI_3.2.0_RC1\Common\Input\Win32\ResourceW32Pointer.cpp:48: error: cast
from 'WCHAR*' to 'WORD' loses precision
Here's the full source:
www.pastebin.com/gzqLBFh9
MinGW compiler.
There was error cast from 'CHAR*' to 'WORD' loses precision and selbie gave an advice to add macro here: Create window with WNDCLASSEX? [Cpp] . Thanks to him - it disappeared.
The problem is actually at MAKEINTRESOURCE(IDC_ARROW) and isn't related to the type of mHandle. [Aside: I agree that mHandle should not be size_t but I think that is not your current problem.]
Since IDC_ARROW is defined to be MAKEINTRESOURCE(32512), the code should in fact read
LoadCursor(NULL, IDC_ARROW)
rather than
LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW))
The latter code fails because IDC_ARROW is LPTSTR but MAKEINTRESOURCE() expects WORD. That explains the error message you see. In fact IDC_ARROW is already a resource type and needs no further processing.
Likewise, all the other calls to LoadCursor() are in error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With