[REACTOS] Fix LoadCursorW() incorrect usage cases (#7053)

Fix wrong MAKEINTRESOURCEW() macro usage cases in LoadCursorW() system-wide.
MSDN documentation for this function states we need to use MAKEINTRESOURCEW() macro only for internal application-defined cursors (loaded from the app instance specified by hInstance parameter), but not for system-defined cursors (those begin with IDC_* prefix), in case when hInstance is NULL.
So get rid from MAKEINTRESOURCEW() macro usage for all cases when hInstance parameter is NULL. And on the contrary, when hInstance is valid and points to the application instance, then use it for the resource identifier.
This commit is contained in:
Oleg Dubinskiy 2024-07-01 18:05:46 +02:00 committed by GitHub
parent f57601d14b
commit 1a1025011f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 19 additions and 7 deletions

View file

@ -1061,7 +1061,7 @@ static ATOM MAIN_RegisterMainWinClass(VOID)
wndClass.cbWndExtra = 0;
wndClass.hInstance = Globals.hInstance;
wndClass.hIcon = Globals.hMainIcon;
wndClass.hCursor = LoadCursorW(NULL, MAKEINTRESOURCEW(IDC_ARROW));
wndClass.hCursor = LoadCursorW(NULL, IDC_ARROW);
wndClass.hbrBackground = (HBRUSH)GetStockObject(NULL_BRUSH);
wndClass.lpszMenuName = NULL;
wndClass.lpszClassName = STRING_MAIN_WIN_CLASS_NAME;