I need to display some shapes (5 rectangles to be precise) on my caption less child window when ever my cursor is on the window, and erase them when cursor leaves the window; i.e enters into the parent window region.
I am tracking the mouse movement to the child window through NCHITTEST, and the rectangles pop up perfectly. But i cant get them to disappear when my cursor leaves the child window, they just remain there on the client area until WM_PAINT is called on to the window.
Can anybody tell me how to achieve this functionality? I need to use the NCHITTEST case as rest of my functionality depends on it. I have tried tracking mouse_move and lbuttondown events, but these events aren't being captured along with nchittest.