I am working on a Win32 control. There may be hundreds of โitemsโ on this control. These are not windows, but internal objects (for example: rectangles). Depending on the position of the mouse, I want to change the mouse cursor. This is normal, I can use WM_SETCURSOR.
At the same time, based on the movement of the mouse, I want to display a status bar that displays information about the object under the mouse. For this I can use WM_MOUSEMOVE.
Because there may be hundreds of objects traveling through them to find them under the mouse, but this is not effective, especially twice (one for a given cursor, one for moving the mouse).
To do this briefly, did you know that WM_SETCURSOR and WM_MOUSEMOVE are ALWAYS paired? In this case, I can calculate what I want during WM_SETCURSOR. Another option is to set the mouse cursor during WM_MOUSEMOVE, but as far as I know this is not a good solution (it will flicker).
thanks
null
source share