How on C to change the shape of the cursor to one of the standard when it moves to certain coordinates? I read on this topic and realized that you need to use LoadCursor and SetCursor. But where in the code to enable LoadCursor? In WinMain or somewhere in the message handler?

    1 answer 1

    LoadCursor () makes sense when you start the application - if it is in your resources. The standard cursor can be loaded at any time.

    SetCursor () is done in response to the WM_SETCURSOR message.

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms648380(v=vs.85).aspx#_win32_Displaying_a_Cursor

    • Quote: "The standard cursor can be loaded at any time." But to improve performance, where is it better? In WinMain? - 0Zerro
    • 2
      I don’t think it will have any impact on performance. Yes, usually such things are done in WinMain before the main message loop. - nzeemin 4:52 pm