| |

VerySource

 Forgot password?
 Register
Search
View: 621|Reply: 1

Challenge this difficult question!

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-18 13:40:02
| Show all posts |Read mode
Beginner VC, hope expert advice ... Thank you!

Hello everyone! I want to use vc to realize that the mouse can become another shape when the menu item is clicked. As for the file of this shape, I have added it to the resource and named it IDC_POINTM.

SetClassLong (m_hWnd, GCL_HCURSOR, (LONG) LoadCursor (NULL, IDC_POINTM));

But I can't display the cursor I want, and the prompt error when running is:

'LoadCursorA': cannot convert parameter 2 from 'const int' to 'const char *'
Then I changed it to
SetClassLong (m_hWnd, GCL_HCURSOR, (LONG) LoadCursor (NULL, MAKEINTRESOURCE (IDC_POINTM)));
But the cursor shape does not change at all after running,

Why is this so urgent? How can we achieve the above operation? Thank you so much!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-17 20:00:01
| Show all posts
HCURSOR m_hAniCursor;//Member of the dialogue class
m_hAniCursor=LoadCursorFromFile("mouse055.ani");//mouse055.ani is the cursor file, put it in the project directory
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list