The point is that CApplication::OnEvent() should not need to know that a particular window should respond to this special event you're sending or not.  The window itself is in the best position to know that.

Thus, a better solution (which may well involve significantly more changes) is to make this special event actually special (rather than piggybacking on the mouse move event) so that you can respond to it in the individual windows appropriately.