Re: SetWindowPos() problem
It's a bug definitely. But not in the OS code. Unless you execute specific code regarding window size or placement, the size of a window will not change.
Most likely the OnLButtonUp message handler calls directly or indirectly such a code. Look for it.
If you can't find anything, there's another solution, involving more work but granting results surely. Place TRACE0 statements in all the places were you have code modifying the size or placement of your window and watch which one is executed.
Not only resizing and moving, but also the quick destruction and re-creation of the window can generate the same undesired effect.
Re: SetWindowPos() problem
Guard the mouse up event. In the OnEmailEvent, set a m_bEmailResizeEvent flag, and in the OnMouseUp event, check if the flag has been set and if it has, skip the resize operation this time.