Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, guys, I do not know how to switch between two cursors under Win64.

What I have tried:

Under Win32 I used such code to switch between two cursors:

void ChangeCursor(bool bc) {
if(!bc)
SetClassLong(m_hWnd, GCL_HCURSOR, (LONG)m_hArr);
else
SetClassLong(m_hWnd, GCL_HCURSOR, (LONG)m_hHnd);
}
but Win64 compiler does not accept it (It dislikes GCL_HCURSOR)
Posted
Updated 17-Mar-20 22:27pm

1 solution

Quote:
It dislikes GCL_HCURSOR
What is the exact error message roduced by the compiler? According to SetClassLongA function (winuser.h) - Win32 apps | Microsoft Docs[^], that is still a valid option. Alternatively you could use SetClassLongPtrW function (winuser.h) - Win32 apps | Microsoft Docs[^] with GCLP_HCURSOR.
 
Share this answer
 
Comments
Member 14105155 18-Mar-20 7:39am    
Thank you, GCLP_HCURSOR was accepted.
Richard MacCutchan 18-Mar-20 7:46am    
It's amazing what you can discover by reading the documentation.
Shao Voon Wong 19-Mar-20 3:23am    
Thank you! Learn something useful from you, 5 stars from a fellow WinAPI and MFC developer.
Richard MacCutchan 19-Mar-20 3:39am    
Like I said, it's the documentation that has the answers, not me.
Member 14105155 19-Mar-20 6:05am    
My Visual Studio 2015 has no MSDN. To find an answer I have to use Internet. Normally when I'm working I'm doing it offline.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900