make MinSize/MaxSize work with Visual C++