If you speed the dialog animation up a lot
the dialog will get bigger and bigger.
This means that the timer message is being processed
before the form checks what its size is. (It's
processing another timer message before it restricts
its size.) This can be corrected by moving the
size check code to before the actual sizing takes place.
if(nIDEvent == IDT_TIMER3)
// PUT THESE CHECKS BEFORE THE MOVEWINDOW CALL!
if((dlgRect.Width() >=nWidth) && (dlgRect.Height() >=nHeight))
::KillTimer(this->m_hWnd, IDT_TIMER3); //Stop the timer
dx=0; // do not over grow
dy=0; // do not over grow
This is a cool idea - congrats for getting something like this working.
However I notice that its not to scale - ie Height finishes sizing before the Width - The idea I had was to extend the class by adding ratios to the expansion of the dialog height and width. This way you could have all manner of expanding dialogs...