c++ set a cursor using SetCursor
ok im setting a cursor in a loop it works but when i move the cursor it just changes back to the way it was. im using win32 api and i u开发者_StackOverflowsed
SetCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDC_PROTECTED)));
IIRC, you want to call SetCursor
in response to WM_SETCURSOR
. If memory serves, the cursor will also stay what you've set if the cursor member of the window class is set to NULL.
Yes. It is being changed by DefWindowProc().
if you want a different cursor over your window, use SetClassLong(), or, change the hCursor field of WNDCLASS when calling RegisterClass, if you are the one who's calling it youself
may be you can try setcursor in WM_MOUSEMOVE.
精彩评论