Боян жуткий, терпите
//////////////////////////////////////////////////////////////////////////
//
// CFileOpenBrowser::ResetDialogHeight
//
// Hack for Borland JBuilder Professional (pah!)
//
...
// These guys relied on a bug in Win95/NT4's Comdlg32 that we fixed in IE4.
// So instead of reintroducing the bug, we detect that they are relying
// on the bug and hack around their stupidity.
//
// These guys do a SetWindowLong(GWL_STYLE) on the dialog box and
// then reparent it! Unfortunately, they didn't quite get their
// bookkeeping right: They forgot to do a RedrawWindow after removing
// the WS_CAPTION style. You see, just editing the style doesn't do
// anything - the style changes don't take effect until the next
// RedrawWindow. When they scratched their heads ("Hey, why is
// the caption still there?"), they decided to brute-force the
// solution: They slide the window so the caption goes "off the screen".
//
// Problem: We fixed a bug for IE4 where ResetDialogHeight would screw
// up and not resize the dialog when it should've, if the app did a
// SetWindowPos on the window to change its vertical position downward
// by more than the amount we needed to grow.
//
// So now when we resize it properly, this generates an internal
// RedrawWindow, which means that Borland's brute-force hack tries
// to fix a problem that no longer exists!
//
// Therefore, ResetDialogHeight now checks if the app has
//
// 1. Changed the dialog window style,
// 2. Moved the dialog downward by more than we needed to grow,
// 3. Forgotten to call RedrawWindow.
//
// If so, then we temporarily restore the original dialog window style,
// do the (correct) resize, then restore the window style. Reverting
// the window style means that all the non-client stuff retains its old
// (incorrect, but what the app is expecting) size.
//
//////////////////////////////////////////////////////////////////////////