From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- .../openmpt-trunk/mptrack/ResizableDialog.h | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Src/external_dependencies/openmpt-trunk/mptrack/ResizableDialog.h (limited to 'Src/external_dependencies/openmpt-trunk/mptrack/ResizableDialog.h') diff --git a/Src/external_dependencies/openmpt-trunk/mptrack/ResizableDialog.h b/Src/external_dependencies/openmpt-trunk/mptrack/ResizableDialog.h new file mode 100644 index 00000000..2771dba2 --- /dev/null +++ b/Src/external_dependencies/openmpt-trunk/mptrack/ResizableDialog.h @@ -0,0 +1,33 @@ +/* + * ResizableDialog.h + * ----------------- + * Purpose: A wrapper for resizable MFC dialogs that fixes the dialog's minimum size + * (as MFC does not scale controls properly if the user makes the dialog smaller than it originally was) + * Notes : (currently none) + * Authors: OpenMPT Devs + * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. + */ + + +#pragma once + +#include "openmpt/all/BuildSettings.hpp" + +OPENMPT_NAMESPACE_BEGIN + +class ResizableDialog : public CDialog +{ +private: + CPoint m_minSize; + +public: + ResizableDialog() = default; + explicit ResizableDialog(UINT nIDTemplate, CWnd *pParentWnd = nullptr); + +protected: + BOOL OnInitDialog() override; + afx_msg void OnGetMinMaxInfo(MINMAXINFO *mmi); + DECLARE_MESSAGE_MAP() +}; + +OPENMPT_NAMESPACE_END -- cgit