I'm sure you are aware that WindowProc handles a LOT of traffic. Any code outside the switch (message) loop will be executed by every message that goes through the pump.
I just made a small dialog based MFC app, where I override the WindowProc and simply count how many times it gets called. Test showed that just moving the mouse cursor over the dialog generates more than 1000 WindowProc calls per second.
Just something to think about.
p.s. I would have added this as a comment, but I don't have enough reputation score for it yet.