I need to display some shapes (more precisely, 5 rectangles) in my small child window when my cursor is in the window, and erase them when the cursor leaves the window; ie enters the area of the parent window.
I track the mouse movement in the child window through NCHITTEST, and the rectangles pop up perfectly. But I can’t make them disappear when my cursor leaves the child window, they just stay there in the client area until WM_PAINT is called into the window.
Can someone tell me how to achieve this functionality? I need to use the NCHITTEST case, as the rest of my functionality depends on it. I tried to track the mouse_move and lbuttondown events, but these events are not recorded with nchittest.
source
share