From: <sv...@op...> - 2024-11-10 16:52:20
|
Author: sagamusix Date: Sun Nov 10 17:52:08 2024 New Revision: 22145 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22145 Log: [Imp] Make MIDI mapping dialog resizable. Modified: trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp trunk/OpenMPT/mptrack/MIDIMappingDialog.h trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp ============================================================================== --- trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp Sun Nov 10 17:48:58 2024 (r22144) +++ trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp Sun Nov 10 17:52:08 2024 (r22145) @@ -27,10 +27,10 @@ OPENMPT_NAMESPACE_BEGIN -CMIDIMappingDialog::CMIDIMappingDialog(CWnd *pParent, CSoundFile &rSndfile) - : DialogBase(IDD_MIDIPARAMCONTROL, pParent) - , m_sndFile(rSndfile) - , m_rMIDIMapper(m_sndFile.GetMIDIMapper()) +CMIDIMappingDialog::CMIDIMappingDialog(CWnd *pParent, CSoundFile &sndfile) + : ResizableDialog{IDD_MIDIPARAMCONTROL, pParent} + , m_sndFile{sndfile} + , m_rMIDIMapper{m_sndFile.GetMIDIMapper()} { CMainFrame::GetInputHandler()->Bypass(true); oldMIDIRecondWnd = CMainFrame::GetMainFrame()->GetMidiRecordWnd(); @@ -44,9 +44,9 @@ } -void CMIDIMappingDialog::DoDataExchange(CDataExchange* pDX) +void CMIDIMappingDialog::DoDataExchange(CDataExchange *pDX) { - DialogBase::DoDataExchange(pDX); + ResizableDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_COMBO_CONTROLLER, m_ControllerCBox); DDX_Control(pDX, IDC_COMBO_PLUGIN, m_PluginCBox); DDX_Control(pDX, IDC_COMBO_PARAM, m_PlugParamCBox); @@ -57,7 +57,7 @@ } -BEGIN_MESSAGE_MAP(CMIDIMappingDialog, DialogBase) +BEGIN_MESSAGE_MAP(CMIDIMappingDialog, ResizableDialog) ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST1, &CMIDIMappingDialog::OnSelectionChanged) ON_BN_CLICKED(IDC_CHECKACTIVE, &CMIDIMappingDialog::OnBnClickedCheckactive) ON_BN_CLICKED(IDC_CHECKCAPTURE, &CMIDIMappingDialog::OnBnClickedCheckCapture) @@ -111,7 +111,7 @@ BOOL CMIDIMappingDialog::OnInitDialog() { - DialogBase::OnInitDialog(); + ResizableDialog::OnInitDialog(); // Add events m_EventCBox.SetItemData(m_EventCBox.AddString(_T("Controller Change")), MIDIEvents::evControllerChange); Modified: trunk/OpenMPT/mptrack/MIDIMappingDialog.h ============================================================================== --- trunk/OpenMPT/mptrack/MIDIMappingDialog.h Sun Nov 10 17:48:58 2024 (r22144) +++ trunk/OpenMPT/mptrack/MIDIMappingDialog.h Sun Nov 10 17:52:08 2024 (r22145) @@ -15,8 +15,8 @@ #ifndef NO_PLUGINS #include "CListCtrl.h" -#include "DialogBase.h" #include "MIDIMapping.h" +#include "ResizableDialog.h" #include "PluginComboBox.h" @@ -25,7 +25,7 @@ class CSoundFile; class CMIDIMapper; -class CMIDIMappingDialog : public DialogBase +class CMIDIMappingDialog : public ResizableDialog { public: CMIDIMappingDirective m_Setting; Modified: trunk/OpenMPT/mptrack/mptrack.rc ============================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc Sun Nov 10 17:48:58 2024 (r22144) +++ trunk/OpenMPT/mptrack/mptrack.rc Sun Nov 10 17:52:08 2024 (r22145) @@ -3340,7 +3340,7 @@ // IDD_MIDIPARAMCONTROL DIALOGEX 0, 0, 413, 247 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "MIDI Mapping" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -3585,6 +3585,32 @@ 0 END +IDD_MIDIPARAMCONTROL AFX_DIALOG_LAYOUT +BEGIN + 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 100, 100, + 100, 0, 0, 100, + 100, 100, 0, 0, + 0, 0, 0, 0 +END + ///////////////////////////////////////////////////////////////////////////// // |