开发者

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)));

any idea


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜