For several windows in my project I use modeless dialogs and CResizer with them. But there exists an issue that when you minimize such a dialog then restore it, everything is off a bit with empty space added on the bottom and the right of the dialog. I believe it has to do with the scrollbars, as the width and height of them would match up. But this happens with the dialog no matter what size it is before and after its minimized.
Manually resizing the window fixes it visually. But I would love to know of a code fix for it. Either repairing the problem or a workaround.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've submitted a fix for this problem. It involved a slight modification to CResizer::RecalcLayout. It turns out that the calls to SetScrollInfo sometimes changed the size of the dialog's client area.
For several windows in my project I use modeless dialogs and CResizer with them. But there exists an issue that when you minimize such a dialog then restore it, everything is off a bit with empty space added on the bottom and the right of the dialog. I believe it has to do with the scrollbars, as the width and height of them would match up. But this happens with the dialog no matter what size it is before and after its minimized.
Manually resizing the window fixes it visually. But I would love to know of a code fix for it. Either repairing the problem or a workaround.
I've submitted a fix for this problem. It involved a slight modification to CResizer::RecalcLayout. It turns out that the calls to SetScrollInfo sometimes changed the size of the dialog's client area.
CRisizer::RecalcLayout now looks like this:
You can download the updated code using SVN, or simply make the modification listed above.
Best regards,
David
Last edit: David 2014-02-26