I have a small MFC dialog app that gets an event notification when I receive an email.
In my OnEmailEvent() event handler I resize the dialog so it will fit to the size of the email.
Everything is working great BUT there is an edge case (bug??) that I've failed to solve when the following sequence of events happens:Code:void OnEmailEvent() { this->SetWindowPos( &wndTopMost, 0, 0, m_rcDialog.Width(), m_rcDialog.Height(), SWP_NOMOVE ); }
1. The user clicks on the dialog window title and hold the mouse button pressed.
2. An email is received so the OnEmailEvent function is triggered and the dialog gets resized.
3. The user releases the mouse button and the dialog will be resized again to what it was BEFORE the event handler resized it.
Is there a way to overcome this?
Please help!!
Many thanks




Reply With Quote