Well, that call to InvalidateRect will invalidate all windows causing WM_PAINT messages to be sent to all of them, since the HWND is NULL. And the TRUE for the bErase means that when each WM_PAINT handler calls BeginPaint (directly or by constructing a CPaintDC) the WM_ERASEBKGND message will be sent as well, causing much flicker. It sounds like you know where to draw the icon, so I would suggest that you have all the info you need to fill in these values - which window, a RECT corresponding to the icon location, and, depending on the nature of the window, perhaps FALSE for bErase, and things will be much smoother.