I can register a window class with the default cursor using:
WNDCLASSEX wc = {0}; wc.hCursor = LoadCursor(nullptr, IDC_ARROW); But after looking at the docs for LoadCursor here:
it says that "This function has been superseded by the LoadImage function"
What is the equivalent LoadCursor call to get the default arrow cursor?
11 Answer
According to the document:
hInst
To load an OEM image, set this parameter to
NULL.name
To pass these constants to the
LoadImagefunction, use theMAKEINTRESOURCEmacro. For example, to load theOCR_NORMALcursor, passMAKEINTRESOURCE(OCR_NORMAL)as the lpszName parameter,NULLas the hinst parameter, andLR_SHAREDas one of the flags to the fuLoad parameter.
so just use the following code:
wndclass.hCursor = (HCURSOR) LoadImage(NULL, MAKEINTRESOURCE(OCR_NORMAL), IMAGE_CURSOR, 0, 0, LR_SHARED); 1